1

清洁吊舱后,我无法再构建我的项目。我想第一次构建 ipa,但由于flutter runor有此错误,因此无法实现flutter build ipa。谢谢你的帮助。

使用登录的新错误更新了跟踪日志

顺便说一句,这是在 macbook M1 芯片上。

感谢您的帮助,不胜感激。

Launching lib/main.dart on iPhone 13 in debug mode...
Running Xcode build...                                                  
Xcode build done.                                            3.0s
Failed to build iOS app
Error output from Xcode build:
↳
    objc[82744]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libamsupport.dylib
    (0x1f7ef3130) and
    /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice
    (0x105ae42c8). One of the two will be used. Which one is undefined.
    objc[82744]: Class AMSupportURLSession is implemented in both /usr/lib/libamsupport.dylib (0x1f7ef3180)
    and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice
    (0x105ae4318). One of the two will be used. Which one is undefined.
    --- xcodebuild: WARNING: Using the first of multiple matching destinations:
    { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder,
    name:Any iOS Simulator Device }
    { platform:iOS Simulator, id:AD71F6D7-E4C2-44C2-87A9-81B59FFC7C80, OS:15.2, name:iPad (9th generation)
    }
    { platform:iOS Simulator, id:63640A82-DCF5-4855-A5F2-90AF00E9E6DF, OS:15.2, name:iPad Air (4th
    generation) }
    { platform:iOS Simulator, id:31CA8F73-7F3A-4D56-8928-85E7097476BB, OS:15.2, name:iPad Pro (9.7-inch) }
    { platform:iOS Simulator, id:253D8767-81F3-4FEC-89F0-BE228B851B85, OS:15.2, name:iPad Pro (11-inch)
    (3rd generation) }
    { platform:iOS Simulator, id:5C82E6C0-9FB1-40BD-838C-00EC58C6DCC7, OS:15.2, name:iPad Pro (12.9-inch)
    (5th generation) }
    { platform:iOS Simulator, id:B3406877-B55F-46F0-930E-30D7648B09B8, OS:15.2, name:iPad mini (6th
    generation) }
    { platform:iOS Simulator, id:18F99A95-122F-4EBE-BC8B-06B62D1E3E8E, OS:15.2, name:iPhone 8 }
    { platform:iOS Simulator, id:939D08A5-C470-41B7-A241-AD4DA7FE8ABA, OS:15.2, name:iPhone 8 Plus }
    { platform:iOS Simulator, id:538F2CCC-7CFD-425F-A252-F4A46FE79A30, OS:15.2, name:iPhone 11 }
    { platform:iOS Simulator, id:FF126BB0-7DF9-4976-8878-625031BDA3C0, OS:15.2, name:iPhone 11 Pro }
    { platform:iOS Simulator, id:84A799FD-6B0B-4000-8596-69ECF4FDF1E1, OS:15.2, name:iPhone 11 Pro Max }
    { platform:iOS Simulator, id:D79C2732-B5BC-4EA4-8CF1-2E4DD7ADF469, OS:15.2, name:iPhone 12 }
    { platform:iOS Simulator, id:30C8D07D-6489-4C3B-B26D-CD24DC5F72C3, OS:15.2, name:iPhone 12 Pro }
    { platform:iOS Simulator, id:89AD22E9-5AD9-40A3-BC4A-13A73806A748, OS:15.2, name:iPhone 12 Pro Max }
    { platform:iOS Simulator, id:2A2D47AF-C4C5-4098-8F43-0F178AE620BA, OS:15.2, name:iPhone 12 mini }
    { platform:iOS Simulator, id:639C83E9-851D-4D27-BCE4-12524100F98A, OS:15.2, name:iPhone 13 }
    { platform:iOS Simulator, id:EAB79697-A076-48AF-8758-AFD83A03B286, OS:15.2, name:iPhone 13 Pro }
    { platform:iOS Simulator, id:87F9D4C0-8771-49D0-B1CC-5D06FF2C2CC7, OS:15.2, name:iPhone 13 Pro Max }
    { platform:iOS Simulator, id:A03B272B-0D2F-48F5-97A1-153E7A281070, OS:15.2, name:iPhone 13 mini }
    { platform:iOS Simulator, id:91748DDF-6EED-41C1-85AB-FF609E333FB1, OS:15.2, name:iPhone SE (2nd
    generation) }
    { platform:iOS Simulator, id:553E6A57-23AF-462B-B4D1-59B5AD6BC5BA, OS:15.2, name:iPod touch (7th
    generation) }
    { platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00006000-0014053122A1801E }
    { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
    ** BUILD FAILED **


Xcode's output:
↳
    In file included from
    /Users/christophevidal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview
    -2.7.1/ios/Classes/JavaScriptChannelHandler.m:5:
    /Users/christophevidal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview
    -2.7.1/ios/Classes/JavaScriptChannelHandler.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
    In file included from
    /Users/christophevidal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview
    -2.7.1/ios/Classes/FLTWebViewFlutterPlugin.m:5:
    /Users/christophevidal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview
    -2.7.1/ios/Classes/FLTWebViewFlutterPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
    In file included from
    /Users/christophevidal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview
    -2.7.1/ios/Classes/FLTWKProgressionDelegate.m:5:
    /Users/christophevidal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview
    -2.7.1/ios/Classes/FLTWKProgressionDelegate.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
    In file included from
    /Users/christophevidal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview
    -2.7.1/ios/Classes/FLTWKNavigationDelegate.m:5:
    /Users/christophevidal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview
    -2.7.1/ios/Classes/FLTWKNavigationDelegate.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
    In file included from
    /Users/christophevidal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview
    -2.7.1/ios/Classes/FLTCookieManager.m:5:
    /Users/christophevidal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview
    -2.7.1/ios/Classes/FLTCookieManager.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
    In file included from
    /Users/christophevidal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview
    -2.7.1/ios/Classes/JavaScriptChannelHandler.m:5:
    /Users/christophevidal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview
    -2.7.1/ios/Classes/JavaScriptChannelHandler.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in dependency order

Could not build the application for the simulator.
Error launching application on iPhone 13.

4

1 回答 1

1

第一步(打开IDE终端)

  1. 安卓工作室
  1. 视觉工作室代码

第 2 步(编写颤振命令):-

  1. 添加您的路径:- export PATH="$PATH:/Users/{username}/flutter/bin"

输入命令
2)flutter clean
3)flutter pub get
4)cd ios
5)pod install 或 pod update

步骤 3 安装 cocoapods

1) 打开终端 (cmd+space)
2) 输入此命令:- sudo gem install cocoapods

有关 cocoapods 的更多信息:-访问此网站

第4步

再次打开 IDE 终端并输入 build ios。
我希望这对您有任何疑问问我有帮助。谢谢你。
于 2021-12-10T12:58:02.607 回答