简体   繁体   English

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

[英]Flutter - Failed to build iOS app on Android Studio

I'm using Flutter with Android-Studio, everything was working great (ie compiling and deploying to iOS simulators except until I installed Fastlane Tools . The building process now is broken somehow! I'm not sure if it's from Fastlane or something else though, but now I'm stuck and cannot deploy to iOS anymore.我正在将 Flutter 与 Android-Studio 一起使用,一切都运行良好(即编译并部署到 iOS 模拟器,除非我安装了Fastlane Tools 。现在构建过程不知何故中断了!我不确定它是来自 Fastlane 还是其他东西,但现在我卡住了,无法再部署到 iOS。

Steps taken/tried already:已经采取/尝试过的步骤:

  1. Removing XCode & CommandLineTools (using this post: Complete removal old XCode )删除 XCode 和 CommandLineTools(使用这篇文章:完全删除旧的 XCode
  2. Reinstalling XCode 9.2 (from AppStore)重新安装 XCode 9.2(来自 AppStore)
  3. Reinstalling CommandLineTools for XCode 9.2 (dl from developer tools page)为 XCode 9.2 重新安装 CommandLineTools(来自开发者工具页面的 dl)
  4. Reinstalling/updating ios-deply using:使用以下命令重新安装/更新 ios-deply:

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

Error log is on PasteBin to reduce post size:错误日志位于 PasteBin 上以减少帖子大小:

https://pastebin.com/HQdJYLBr

Flutter doctor report:颤振医生报告:

[✓] 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)

Any suggestions, please?请问有什么建议吗?

This answer is for the ones who are still trying to work with Xcode 9.2.这个答案适用于那些仍在尝试使用 Xcode 9.2 的人。 Starting April, 2020, all apps submitted to the App Store will need to be built with Xcode 11. So don't try to build your Flutter IOS App with XCode 9.2.从 2020 年 4 月开始,所有提交到 App Store 的应用程序都需要使用 Xcode 11 构建。所以不要尝试使用 XCode 9.2 构建您的 Flutter IOS 应用程序。 Flutter is also changing rapidly therefore, it is better to use the latest XCode version to avoid any deprecated API issue. Flutter 也在快速变化,因此最好使用最新的 XCode 版本以避免任何弃用的 API 问题。

For reference visit:参考访问:
https://github.com/firebase/firebase-ios-sdk/issues/4125 https://github.com/firebase/firebase-ios-sdk/issues/4125

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM