Flutter - 无法在Android Studio上构建iOS应用程序

时间:2018-03-23 04:28:14

标签: ios android-studio flutter

我正在使用Flutter和Android-Studio,一切都运行良好(即编译和部署到iOS模拟器,除非我安装Fastlane Tools。现在构建过程以某种方式被破坏了!我不确定它是否是从Fastlane或其他东西,但现在我卡住了,不能再部署到iOS了。

已采取/尝试的步骤:

  1. 删除XCode& CommandLineTools(使用这篇文章:Complete removal old XCode
  2. 重新安装XCode 9.2(来自AppStore)
  3. 重新安装适用于XCode 9.2的CommandLineTools(来自开发人员工具页面的dl)
  4. 使用以下方法重新安装/更新ios-deply:

    npm install -g ios-deploy --unsafe-perm = true

  5. 错误日志在PasteBin上以减少帖子大小:

    https://pastebin.com/HQdJYLBr
    

    Flutter医生报告:

    [✓] Flutter (on Mac OS X 10.13.3 17D102, locale en-AE, channel alpha)
        • Flutter version 0.0.22-pre.1 at /Users/user999/github/flutter
        • Framework revision 553fc4264e (3 weeks ago), 2018-03-01 09:30:25 -0800
        • Engine revision 6921873c71
        • Tools Dart version 2.0.0-dev.16.0
        • Engine Dart version 2.0.0-edge.da1f52592ef73fe3afa485385cb995b9aec0181a
    
    [✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
        • Android SDK at /Users/user999/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: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
    
    [✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 9.2, Build version 9C40b
        • ios-deploy 1.9.2
        • CocoaPods version 1.4.0
    
    [✓] Android Studio (version 3.0)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
    
    [✓] IntelliJ IDEA Community Edition (version 2017.3.4)
        • Flutter plugin version 21.2.3
        • Dart plugin version 173.4548.30
    
    [✓] Connected devices
        • iPhone X • 2AD97E20-6FB5-4086-BDC0-EBE6138FBD79 • ios • iOS 11.2 (simulator)
    

    有什么建议吗?

1 个答案:

答案 0 :(得分:2)

此答案适用于仍在尝试使用Xcode 9.2的用户。从2020年4月开始,所有提交到App Store的应用都将需要使用Xcode 11进行构建。因此,请勿尝试使用XCode 9.2构建Flutter IOS应用。 Flutter的变化也在迅速变化,因此,最好使用最新的XCode版本以避免任何过时的API问题。

供参考,请访问:
https://github.com/firebase/firebase-ios-sdk/issues/4125