【问题标题】:When I run flutter build IOS gets stuck in the middle of process当我运行颤振构建时,IOS 卡在进程中间
【发布时间】:2019-04-17 15:21:21
【问题描述】:

每当我运行 flutter build IOS 时,它似乎工作正常,但是当它到达“构建 Dart 代码”的时候,它就会永远卡在那里。 然而,在此之前我能够成功运行 flutter build apk。

这是颤振医生 -v 的输出:

[✓] Flutter (Channel beta, v0.11.3, on Mac OS X 10.13.6 17G65, locale en-GB)
    • Flutter version 0.11.3 at /Users/../flutter
    • Framework revision 72bf075e8d (4 days ago), 2018-11-09 20:36:17 -0800
    • Engine revision 5646e86a6f
    • Dart version 2.1.0 (build 2.1.0-dev.9.3 9c07fb64c4)

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /Users/../Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • Java binary at: /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/bin/java
    • Java version Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.0, Build version 10A255
    • ios-deploy 1.9.2
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 30.0.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[!] Android Studio
    • Android Studio at /Applications/Android/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    ✗ Android Studio not found at /Applications/Android/Contents
    • Try updating or re-installing Android Studio.

[✓] VS Code (version 1.24.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.20.0

[✓] Connected device (1 available)
    • .. iPhone • 77afb908fc6c490d3fca62cdde9a74ab4e45b4f0 • ios • iOS 11.4.1

! Doctor found issues in 1 category.

我还将发布卡在哪里:

-MacBook-Pro:flutterLoginApp-master4OK ..$ flutter build ios
为设备构建登录(ios-release)...使用 Xcode 项目中指定的开发团队自动签署 iOS 以进行设备部署:...
开始 Xcode 构建... ├─构建 Dart 代码... 1.6s //然后永远卡在这里 ...

【问题讨论】:

  • 是的,同意@GünterZöchbauer,但是,它似乎还没有解决。
  • 我已切换到开发频道也尝试运行 flutter build ios --release -v > build.log 但似乎没有任何改变。
  • Flutter 0.11.7 • channel beta 已发布并解决了该问题。运行flutter upgrade
  • 我尝试了所有解决方案,但运行 Flutter 1.17.2 没有任何效果

标签: android-studio dart flutter


【解决方案1】:

根据此处发布的解决方案https://github.com/flutter/flutter/issues/24139,您可以将输出重定向到带有> build.log 之类的文件以解决此问题。 试试flutter run --release > build.log

【讨论】:

  • 好吧,这对我来说真的不起作用,因为是的,它已经将它通过管道传输到一个文件中,但什么都不会发生,只是转到 shell 的下一行
【解决方案2】:

当前 beta 版本 (0.11.3) 无法正常工作,并且在 ios 上构建发布版本时卡住了。 目前的修复方法是在 beta 版本卡住时降级您的颤振版本或更改为 master 分支。

您可以在终端上使用flutter channel master,然后使用flutter upgrade

【讨论】:

    【解决方案3】:

    我已经切换到主频道并运行:flutter build ios --release 并且一切都开始工作得非常棒。

    【讨论】:

      猜你喜欢
      • 2020-12-05
      • 2021-10-25
      • 2021-01-05
      • 2021-08-14
      • 2021-05-31
      • 1970-01-01
      • 2021-01-07
      • 2022-11-15
      • 2021-12-17
      相关资源
      最近更新 更多