更新到 1.15.22-pre.18 后,Flutter 将不会 运行 on iOS。 Xcode 构建失败
Flutter won't run on iOS after updating to 1.15.22-pre.18. Xcode build failing
我正在编写一个 flutter 应用程序,直到今晚它都运行良好。它在 iOS 模拟器和 iOS 设备上编译和 运行。今天晚上,VSCode 通知我 Flutter 有新版本,所以我升级了。升级后,Flutter Doctor 告诉我升级 cocoapods,我也这样做了(因为我在 OSX 10.14.6 上,不得不弄乱 Ruby 2.3 SDK。但是,现在我的项目不会为 iOS 模拟器或 iOS 设备构建。
我试过'flutter clean'但没用。
我得到的错误是:
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/lib/libSystem.tbd, missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/lib/libSystem.tbd (4 slices)
ld: building for iOS, but linking in object file (/var/folders/fh/fs6qqn7x5_5c3bbq36ct4nj40000gn/T/debug_app-2d4374.o) built for iOS Simulator, file '/var/folders/fh/fs6qqn7x5_5c3bbq36ct4nj40000gn/T/debug_app-2d4374.o' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Command: xcrun clang -x c -arch x86_64 /var/folders/fh/fs6qqn7x5_5c3bbq36ct4nj40000gn/T/flutter_tools_stub_source.F8IoZt/debug_app.cc -dynamiclib -fembed-bitcode-marker -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -install_name @rpath/App.framework/App -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk -o /Users/paul/Documents/Development/flutter/scale_practice_app2/.dart_tool/flutter_build/eabd0dc878995215df4262cdd052ace8/simulator_framework
build failed.
note: Using new build system
note: Planning build
note: Constructing build description
Could not build the precompiled application for the device.
It appears that your application still contains the default signing identifier.
Try replacing 'com.example' with your signing id in Xcode:
open ios/Runner.xcworkspace
Error launching application on Paul's iPhone XR.**
Here is the output of 'flutter doctor -v':
**[✓] Flutter (Channel master, v1.15.22-pre.18, on Mac OS X 10.14.6 18G3020, locale en-GB)
• Flutter version 1.15.22-pre.18 at /Users/paul/Apps/flutter
• Framework revision 8bff33e497 (2 hours ago), 2020-03-13 17:26:02 -0700
• Engine revision 9226a3881e
• Dart version 2.8.0 (build 2.8.0-dev.14.0 a303769fad)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/paul/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.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_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.3.1, Build version 11C504
• CocoaPods version 1.9.1
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 43.0.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] VS Code (version 1.43.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.8.1
[✓] Connected device (3 available)
• Paul's iPhone XR • 00008020-001B64482ED8003A • ios • iOS 13.3.1
• iPhone XR • 154A94BD-01CF-40B0-B25E-88073359CA3E • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)
• macOS • macOS • darwin-x64 • Mac OS X 10.14.6 18G3020
• No issues found!
我遵循了一些 Google 的建议来重新创建我的 pod 文件等,但还没有修复它。我还创建了一个新的 Flutter 项目,复制到我的 .dart 和资产文件中,但新项目仍然无法构建,出现相同的错误。
如有任何帮助,我们将不胜感激。
完全卸载并重新安装 cocoapods、flutter 和 xcode(包括手动清除所有首选项)有效。
我正在编写一个 flutter 应用程序,直到今晚它都运行良好。它在 iOS 模拟器和 iOS 设备上编译和 运行。今天晚上,VSCode 通知我 Flutter 有新版本,所以我升级了。升级后,Flutter Doctor 告诉我升级 cocoapods,我也这样做了(因为我在 OSX 10.14.6 上,不得不弄乱 Ruby 2.3 SDK。但是,现在我的项目不会为 iOS 模拟器或 iOS 设备构建。
我试过'flutter clean'但没用。
我得到的错误是:
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/lib/libSystem.tbd, missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/lib/libSystem.tbd (4 slices)
ld: building for iOS, but linking in object file (/var/folders/fh/fs6qqn7x5_5c3bbq36ct4nj40000gn/T/debug_app-2d4374.o) built for iOS Simulator, file '/var/folders/fh/fs6qqn7x5_5c3bbq36ct4nj40000gn/T/debug_app-2d4374.o' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Command: xcrun clang -x c -arch x86_64 /var/folders/fh/fs6qqn7x5_5c3bbq36ct4nj40000gn/T/flutter_tools_stub_source.F8IoZt/debug_app.cc -dynamiclib -fembed-bitcode-marker -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -install_name @rpath/App.framework/App -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk -o /Users/paul/Documents/Development/flutter/scale_practice_app2/.dart_tool/flutter_build/eabd0dc878995215df4262cdd052ace8/simulator_framework
build failed.
note: Using new build system
note: Planning build
note: Constructing build description
Could not build the precompiled application for the device.
It appears that your application still contains the default signing identifier.
Try replacing 'com.example' with your signing id in Xcode:
open ios/Runner.xcworkspace
Error launching application on Paul's iPhone XR.**
Here is the output of 'flutter doctor -v':
**[✓] Flutter (Channel master, v1.15.22-pre.18, on Mac OS X 10.14.6 18G3020, locale en-GB)
• Flutter version 1.15.22-pre.18 at /Users/paul/Apps/flutter
• Framework revision 8bff33e497 (2 hours ago), 2020-03-13 17:26:02 -0700
• Engine revision 9226a3881e
• Dart version 2.8.0 (build 2.8.0-dev.14.0 a303769fad)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/paul/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.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_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.3.1, Build version 11C504
• CocoaPods version 1.9.1
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 43.0.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] VS Code (version 1.43.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.8.1
[✓] Connected device (3 available)
• Paul's iPhone XR • 00008020-001B64482ED8003A • ios • iOS 13.3.1
• iPhone XR • 154A94BD-01CF-40B0-B25E-88073359CA3E • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)
• macOS • macOS • darwin-x64 • Mac OS X 10.14.6 18G3020
• No issues found!
我遵循了一些 Google 的建议来重新创建我的 pod 文件等,但还没有修复它。我还创建了一个新的 Flutter 项目,复制到我的 .dart 和资产文件中,但新项目仍然无法构建,出现相同的错误。
如有任何帮助,我们将不胜感激。
完全卸载并重新安装 cocoapods、flutter 和 xcode(包括手动清除所有首选项)有效。