我无法在IOS设备上运行我的Flatter项目.

这是我在Flutter 跑之后得到的.我不明白为什么.请看一下下面的错误,并告诉我如何修复它.

Launching lib/main.dart on iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team
in Xcode project: L24VC6F98D
Running Xcode build...                                                  
Xcode build done.                                            8,2s
Failed to build iOS app
Error output from Xcode build:
↳
    2020-09-18 11:56:14.934 xcodebuild[29414:155421] warning:  The file reference
    for "Objective-C/TOCropViewController/Models/TOActivityCroppedImageProvider.h"
    is a member of multiple groups ("TOCropViewController" and
    "TOCropViewController"); this indicates a malformed project.  Only the
    membership in one of the groups will be preserved (but membership in targets
    will be unaffected).  If you want a reference to the same file in more than
    one group, please add another reference to the same path.
    2020-09-18 11:56:14.934 xcodebuild[29414:155421] warning:  The file reference
    for "Objective-C/TOCropViewController/Views/TOCropOverlayView.h" is a member
    of multiple groups ("TOCropViewController" and "TOCropViewController"); this
    indicates a malformed project.  Only the membership in one of the groups will
    be preserved (but membership in targets will be unaffected).  If you want a
    reference to the same file in more than one group, please add another
    reference to the same path.
    2020-09-18 11:56:14.934 xcodebuild[29414:155421] warning:  The file reference
    for "Objective-C/TOCropViewController/Models/TOCroppedImageAttributes.h" is a
    member of multiple groups ("TOCropViewController" and "TOCropViewController");
    this indicates a malformed project.  Only the membership in one of the groups
    will be preserved (but membership in targets will be unaffected).  If you want
    a reference to the same file in more than one group, please add another
    reference to the same path.
    2020-09-18 11:56:14.934 xcodebuild[29414:155421] warning:  The file reference
    for "Objective-C/TOCropViewController/Views/TOCropScrollView.h" is a member of
    multiple groups ("TOCropViewController" and "TOCropViewController"); this
    indicates a malformed project.  Only the membership in one of the groups will
    be preserved (but membership in targets will be unaffected).  If you want a
    reference to the same file in more than one group, please add another
    reference to the same path.
    2020-09-18 11:56:14.934 xcodebuild[29414:155421] warning:  The file reference
    for "Objective-C/TOCropViewController/Views/TOCropToolbar.h" is a member of
    multiple groups ("TOCropViewController" and "TOCropViewController"); this
    indicates a malformed project.  Only the membership in one of the groups will
    be preserved (but membership in targets will be unaffected).  If you want a
    reference to the same file in more than one group, please add another
    reference to the same path.
    2020-09-18 11:56:14.934 xcodebuild[29414:155421] warning:  The file reference
    for "Objective-C/TOCropViewController/Views/TOCropView.h" is a member of
    multiple groups ("TOCropViewController" and "TOCropViewController"); this
    indicates a malformed project.  Only the membership in one of the groups will
    be preserved (but membership in targets will be unaffected).  If you want a
    reference to the same file in more than one group, please add another
    reference to the same path.
    2020-09-18 11:56:14.934 xcodebuild[29414:155421] warning:  The file reference
    for "Objective-C/TOCropViewController/TOCropViewController.h" is a member of
    multiple groups ("TOCropViewController" and "TOCropViewController"); this
    indicates a malformed project.  Only the membership in one of the groups will
    be preserved (but membership in targets will be unaffected).  If you want a
    reference to the same file in more than one group, please add another
    reference to the same path.
    2020-09-18 11:56:14.934 xcodebuild[29414:155421] warning:  The file reference
    for
    "Objective-C/TOCropViewController/Models/TOCropViewControllerTransitioning.h"
    is a member of multiple groups ("TOCropViewController" and
    "TOCropViewController"); this indicates a malformed project.  Only the
    membership in one of the groups will be preserved (but membership in targets
    will be unaffected).  If you want a reference to the same file in more than
    one group, please add another reference to the same path.
    2020-09-18 11:56:14.978 xcodebuild[29414:155477]  DTDeviceKit: deviceType from
    d94358f0937915cc1dbf618d6c7be90be0612766 was NULL
    2020-09-18 11:56:15.129 xcodebuild[29414:155486]  DTDeviceKit: deviceType from
    d94358f0937915cc1dbf618d6c7be90be0612766 was NULL
    2020-09-18 11:56:15.129 xcodebuild[29414:155486]  DTDeviceKit: deviceType from
    d94358f0937915cc1dbf618d6c7be90be0612766 was NULL
    ** BUILD FAILED **


Xcode's output:
↳
    Command CompileSwift failed with a nonzero exit code
    /Users/punreachrany/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/kakao
    _flutter_sdk-0.4.2/ios/Classes/SwiftKakaoFlutterSdkPlugin.swift:103:82: error:
    cannot convert value of type 'Error' to specified type
    'ASWebAuthenticationSessionError.Code'
                        if case ASWebAuthenticationSessionError.Code.canceledLogin
                        = err {
                                                                                     ^~~
    /Users/punreachrany/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/kakao
    _flutter_sdk-0.4.2/ios/Classes/SwiftKakaoFlutterSdkPlugin.swift:108:72: error:
    cannot convert value of type 'Error' to specified type
    'SFAuthenticationError.Code'
                        if case SFAuthenticationError.Code.canceledLogin = err {
                                                                           ^~~
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'shared_preferences' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'path_provider' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'onesignal_flutter' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'leveldb-library' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'image_picker' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'abseil' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'package_info' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'esys_flutter_share' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'PromisesObjC' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'TOCropViewController-TOCropViewControllerBundle' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'TOCropViewController' from project 'Pods')
    warning: Skipping duplicate build file in Copy Headers build phase:
    /Users/punreachrany/Desktop/Flutter/PhotoEarn/ios/Pods/TOCropViewController/Ob
    jective-C/TOCropViewController/Models/TOActivityCroppedImageProvider.h (in
    target 'TOCropViewController' from project 'Pods')
    warning: Skipping duplicate build file in Copy Headers build phase:
    /Users/punreachrany/Desktop/Flutter/PhotoEarn/ios/Pods/TOCropViewController/Ob
    jective-C/TOCropViewController/Views/TOCropOverlayView.h (in target
    'TOCropViewController' from project 'Pods')
    warning: Skipping duplicate build file in Copy Headers build phase:
    /Users/punreachrany/Desktop/Flutter/PhotoEarn/ios/Pods/TOCropViewController/Ob
    jective-C/TOCropViewController/Models/TOCroppedImageAttributes.h (in target
    'TOCropViewController' from project 'Pods')
    warning: Skipping duplicate build file in Copy Headers build phase:
    /Users/punreachrany/Desktop/Flutter/PhotoEarn/ios/Pods/TOCropViewController/Ob
    jective-C/TOCropViewController/Views/TOCropScrollView.h (in target
    'TOCropViewController' from project 'Pods')
    warning: Skipping duplicate build file in Copy Headers build phase:
    /Users/punreachrany/Desktop/Flutter/PhotoEarn/ios/Pods/TOCropViewController/Ob
    jective-C/TOCropViewController/Views/TOCropToolbar.h (in target
    'TOCropViewController' from project 'Pods')
    warning: Skipping duplicate build file in Copy Headers build phase:
    /Users/punreachrany/Desktop/Flutter/PhotoEarn/ios/Pods/TOCropViewController/Ob
    jective-C/TOCropViewController/Views/TOCropView.h (in target
    'TOCropViewController' from project 'Pods')
    warning: Skipping duplicate build file in Copy Headers build phase:
    /Users/punreachrany/Desktop/Flutter/PhotoEarn/ios/Pods/TOCropViewController/Ob
    jective-C/TOCropViewController/TOCropViewController.h (in target
    'TOCropViewController' from project 'Pods')
    warning: Skipping duplicate build file in Copy Headers build phase:
    /Users/punreachrany/Desktop/Flutter/PhotoEarn/ios/Pods/TOCropViewController/Ob
    jective-C/TOCropViewController/Models/TOCropViewControllerTransitioning.h (in
    target 'TOCropViewController' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'nanopb' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'gRPC-C++-gRPCCertificates-Cpp' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'GoogleDataTransport' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'GTMSessionFetcher' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'FBSDKCoreKit' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'BoringSSL-GRPC' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'BSImageView' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'BSGridCollectionViewLayout' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'GoogleUtilities' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'GoogleDataTransportCCTSupport' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'FBSDKLoginKit' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'image_cropper' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'GoogleAppMeasurement' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'gRPC-C++' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'OneSignal-iOS10.0' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'Flutter' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'gRPC-Core' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'FirebaseFirestore' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'FirebaseAuthInterop' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'firebase_auth' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'FirebaseCore' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'firebase_core' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'firebase_database' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'cloud_firestore' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'FirebaseAnalytics' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'FirebaseInstallations' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'FirebaseCoreDiagnosticsInterop' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'FirebaseAuth' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'FirebaseDatabase' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'OneSignal-iOS11.0' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'FirebaseStorage' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'FirebaseCoreDiagnostics' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'firebase_storage' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
    but the range of supported deployment target versions is 9.0 to 14.0.99. (in
    target 'Firebase' from project 'Pods')

Could not build the precompiled application for the device.

Error launching application on iPhone.

我可以做些什么来解决此问题?请给我一个命令行或其他东西.请帮帮我.我期待着您的回音.谢谢.

推荐答案

如果您想要立即模拟它,而不是一般地处理IDE问题,请转到Tools->;Ffltter->;Open iOS Module in Xcode(工具->;Ffltter->;用Xcode打开iOS模块).但要获得进一步的解决方案,请执行Flutter 清理,并从Xcode-&>;Window->;设备和模拟器->;模拟器->;右键单击您的iOS模拟器,然后单击删除.然后在您所在的相同设备和模拟器页面中,从左下角的"+"按钮添加一个新的模拟器.重新运行你的应用程序,它应该可以工作.

Flutter相关问答推荐

为什么在Flutter中使用firebase数据库时获取引用时会划掉引用?

Box约束强制无限高:SizedBox. Expand()

如何组合匹配器

Android上火焰瓷砖之间的线条飘动

框中的Flutter 适配图像

FittedBox叠加技术在Flutter 中的应用

无法将新文物与Flutter 项目集成在一起

为Android生成时出现Flutter 错误:给定资源值的<;COLOR&>无效

使用 Flutter 显示/隐藏带有下拉抽屉动画的小部件

如果其他Provider 的帐户已存在,如何阻止用户登录?

点击按钮后重新启动定时器

Flutter底部面板局部显示

减少 Flutter 中 API 的连接等待时间

面对Flutter 中的行和列问题

type '({bool growable}) => List' 不是类型转换中类型 'List' 的子类型

Flutter 如何使用 ClipPath 编辑容器的顶部?

更改文本字段Flutter 中最大字母的 colored颜色

Firestore:缓存和读取数据

我几乎每次都将 Stateless Widget 与 BLoC 一起使用.我错了吗?

主题:ThemeData() Flutter