【问题标题】:Flutter: IOS Could not build the precompiled application for the device 2021Flutter:IOS 无法为设备构建预编译的应用程序 2021
【发布时间】:2021-05-05 13:22:41
【问题描述】:

正在以调试模式在 Kingman 的 iPhone 上启动 lib/main_dev.dart... 在 Xcode 项目中使用指定开发团队自动签署 iOS 进行设备部署:FK3FA23S5A 运行 Xcode 构建... 由于并发构建,Xcode 构建失败,将在 2 秒后重试。 Xcode 构建完成。 134.1s 无法构建 iOS 应用 Xcode 构建的错误输出:

↳
    ** BUILD FAILED **


Xcode's output:
↳
    /Users/kingman/Documents/development/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.7+12/ios/Classes/FLTImagePickerPlugin.m:149:20: warning: 'UIAlertView' is deprecated: first deprecated in iOS 9.0 - UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead [-Wdeprecated-declarations]
        [[[UIAlertView alloc] initWithTitle:@"Error"
                       ^
    In module 'UIKit' imported from /Users/kingman/Desktop/HLH/projects/ios/Pods/Target Support Files/image_picker/image_picker-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:27:12: note: 'UIAlertView' has been explicitly marked deprecated here
    @interface UIAlertView : UIView
               ^
    1 warning generated.
    /Users/kingman/Documents/development/flutter/.pub-cache/hosted/pub.dartlang.org/qr_code_scanner-0.2.1/ios/Classes/QRView.swift:66:13: warning: 'UIAlertView' was deprecated in iOS 9.0: UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead
                UIAlertView(title: "Scanning Unavailable", message: "This app does not have permission to access the camera", delegate: nil, cancelButtonTitle: nil, otherButtonTitles: "Ok").show()
                ^
    /Users/kingman/Desktop/HLH/projects/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/FIRMessagingPubSub.m:283:12: warning: parameter 'expression' not found in the function declaration [-Wdocumentation]
     *  @param expression The topic expression used to generate a pubsub topic
               ^~~~~~~~~~
    /Users/kingman/Desktop/HLH/projects/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/FIRMessagingPubSub.m:283:12: note: did you mean 'topic'?
     *  @param expression The topic expression used to generate a pubsub topic
               ^~~~~~~~~~
               topic
    1 warning generated.
    /Users/kingman/Desktop/HLH/projects/ios/Pods/gRPC-C++/src/cpp/server/async_generic_service.cc:19:10: fatal error: 'grpcpp/generic/async_generic_service.h' file not found
    #include <grpcpp/generic/async_generic_service.h>
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/kingman/Desktop/HLH/projects/ios/Pods/gRPC-C++/src/cpp/server/async_generic_service.cc:19:10: note: did not find header 'generic/async_generic_service.h' in framework 'grpcpp' (loaded from '/Users/kingman/Desktop/HLH/projects/build/ios/Debug-dev-iphoneos/gRPC-C++')
    1 error generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Using build description from disk

Could not build the precompiled application for the device.

Error launching application on Kingman’s iPhone.

【问题讨论】:

  • 重启你的机器,清理flutter项目,能否请你上传你的pod文件?

标签: ios flutter dart


【解决方案1】:

运行flutter clean 通常可以为我解决问题。您可以尝试的另一种方法是生成新的 ios 版本。您可以删除 Flutter 项目中的 /ios 文件夹并使用 flutter create --platforms=ios [PROJECT] 生成一个新文件夹

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-07
    • 2022-07-19
    • 2021-11-08
    • 2016-01-28
    • 2012-07-29
    • 1970-01-01
    • 1970-01-01
    • 2010-11-03
    相关资源
    最近更新 更多