Flutter:iphone应用程序没有在模拟器中运行
Posted
技术标签:
【中文标题】Flutter:iphone应用程序没有在模拟器中运行【英文标题】:Flutter: iphone app not running in simulator 【发布时间】:2021-03-07 05:29:42 【问题描述】:我非常受此错误困扰,当我构建 android 时它工作正常,但是当我在 ios 模拟器中运行我的应用程序时,它向我显示此错误。我无法找出我的代码中的实际问题。请帮我弄清楚这种情况。
我的flutter sdk版本是1.22.4
正在运行 Xcode 构建... Xcode 构建完成。 117.6s 无法构建 iOS 应用 Xcode 构建的错误输出: ↳ 2020-11-24 15:07:27.120 xcodebuild[84915:1186687] 警告:“Objective-C/TOCropViewController/Models/TOActivityCroppedImageProvider.h”的文件参考是 多个组的成员(“TOCropViewController”和“TOCropViewController”);这表明项目格式不正确。只有其中一个组的成员才能 被保留(但目标成员资格将不受影响)。如果您想在多个组中引用同一文件,请添加另一个引用到 相同的路径。 2020-11-24 15:07:27.120 xcodebuild[84915:1186687] 警告:“Objective-C/TOCropViewController/Views/TOCropOverlayView.h”的文件引用是 多个组(“TOCropViewController”和“TOCropViewController”);这表明项目格式不正确。只有其中一个组的成员资格 保留(但目标成员资格不受影响)。如果您想在多个组中引用同一文件,请添加另一个引用到 相同的路径。 2020-11-24 15:07:27.120 xcodebuild[84915:1186687] 警告:“Objective-C/TOCropViewController/Models/TOCroppedImageAttributes.h”的文件参考是 多个组的成员(“TOCropViewController”和“TOCropViewController”);这表明项目格式不正确。只有其中一个组的成员才能 被保留(但目标成员资格将不受影响)。如果您想在多个组中引用同一文件,请添加另一个引用到 相同的路径。 2020-11-24 15:07:27.120 xcodebuild[84915:1186687] 警告:“Objective-C/TOCropViewController/Views/TOCropScrollView.h”的文件引用是 多个组(“TOCropViewController”和“TOCropViewController”);这表明项目格式不正确。只有其中一个组的成员资格 保留(但目标成员资格不受影响)。如果您想在多个组中引用同一文件,请添加另一个引用到 相同的路径。 2020-11-24 15:07:27.120 xcodebuild[84915:1186687] 警告:“Objective-C/TOCropViewController/Views/TOCropToolbar.h”的文件引用是 多个组(“TOCropViewController”和“TOCropViewController”);这表明项目格式不正确。只有其中一个组的成员资格 保留(但目标成员资格不受影响)。如果您想在多个组中引用同一文件,请添加另一个引用到 相同的路径。 2020-11-24 15:07:27.120 xcodebuild[84915:1186687] 警告:“Objective-C/TOCropViewController/Views/TOCropView.h”的文件引用是多个 组(“TOCropViewController”和“TOCropViewController”);这表明项目格式不正确。只有其中一个组的成员资格将被保留(但 目标成员资格将不受影响)。如果您想在多个组中引用同一文件,请添加对同一路径的另一个引用。 2020-11-24 15:07:27.120 xcodebuild[84915:1186687] 警告:“Objective-C/TOCropViewController/TOCropViewController.h”的文件引用是 多个组(“TOCropViewController”和“TOCropViewController”);这表明项目格式不正确。只有其中一个组的成员资格 保留(但目标成员资格不受影响)。如果您想在多个组中引用同一文件,请添加另一个引用到 相同的路径。 2020-11-24 15:07:27.120 xcodebuild[84915:1186687] 警告:“Objective-C/TOCropViewController/Models/TOCropViewControllerTransitioning.h”的文件参考 是多个组的成员(“TOCropViewController”和“TOCropViewController”);这表明项目格式不正确。仅属于其中一个组的成员 将被保留(但目标中的成员资格将不受影响)。如果您想在多个组中引用同一文件,请添加另一个引用 到同一条路。 ** 构建失败 **
Xcode 的输出:
生成 1 个警告。 /Users/gajendrabhati/Library/Android/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.7+14/ios/Classes/FLTImagePickerPlugin.m:149:20:警告: 'UIAlertView' 已弃用:首先在 iOS 9.0 中弃用 - UIAlertView 已弃用。将 UIAlertController 与 UIAlertControllerStyleAlert 的首选样式一起使用 而是 [-Wdeprecated-declarations] [[[UIAlertView alloc] initWithTitle:@"错误" ^ 在从 /Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/Target Support Files/image_picker/image_picker-prefix.pch:2 导入的模块“UIKit”中: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/System/Library/Frameworks/UIKit.framework/Hea ders/UIAlertView.h:27:12:注意:“UIAlertView”已明确标记为已弃用 @interface UIAlertView : UIView ^ 生成 1 个警告。 /Users/gajendrabhati/Library/Android/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.7+14/ios/Classes/FLTImagePickerPhotoAssetUtil.m:17:44: 警告:'UIImagePickerControllerReferenceURL' 已弃用:在 iOS 11.0 中首次弃用 - 将在未来版本中删除,请使用 phpicker。 [-Wdeprecated-declarations] NSURL *referenceURL = [info objectForKey:UIImagePickerControllerReferenceURL]; ^ 在从 /Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/Target Support Files/image_picker/image_picker-prefix.pch:2 导入的模块“UIKit”中: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/System/Library/Frameworks/UIKit.framework/Hea ders/UIImagePickerController.h:62:51:注意:“UIImagePickerControllerReferenceURL”已在此处明确标记为已弃用 UIKIT_EXTERN UIImagePickerControllerInfoKey const UIImagePickerControllerReferenceURL API_DEPRECATED("将在未来的版本中移除,使用 PHPicker。", ios(4.1, 11.0)) API_UNAVAILABLE(tvos); // 引用 AssetsLibrary 框架中资产的 NSURL ^ /Users/gajendrabhati/Library/Android/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.7+14/ios/Classes/FLTImagePickerPhotoAssetUtil.m:21:47: 警告:'fetchAssetsWithALAssetURLs:options:' 已弃用:在 iOS 11 中首次弃用 - 将在未来版本中删除 [-Wdeprecated-declarations] PHFetchResult
*result = [PHAsset fetchAssetsWithALAssetURLs:@[referenceURL] ^ 在从导入的模块“照片”中 /Users/gajendrabhati/Library/Android/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.7+14/ios/Classes/FLTImagePickerPhotoAssetUtil.h:6: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/System/Library/Frameworks/Photos.framework/He aders/PHAsset.h:74:1: 注意:'fetchAssetsWithALAssetURLs:options:' 已在此处明确标记为弃用 + (PHFetchResult *)fetchAssetsWithALAssetURLs:(NSArray *)assetURLs options:(nullable PHFetchOptions *)options API_DEPRECATED("将被移除 在未来的版本中", ios(8, 11), tvos(8, 11)) API_UNAVAILABLE(macos); ^ 生成 2 个警告。 /Users/gajendrabhati/Library/Android/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/geocoder-0.2.1/ios/Classes/GeocoderPlugin.m:75:36:警告: 'addressDictionary' 已弃用:首先在 iOS 11.0 中弃用 - 使用 @properties [-Wdeprecated-declarations] NSArray *lines = placemark.addressDictionary[@"FormattedAddressLines"]; ^ 在从导入的模块“CoreLocation”中 /Users/gajendrabhati/Library/Android/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/geocoder-0.2.1/ios/Classes/GeocoderPlugin.h:3: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/System/Library/Frameworks/CoreLocation.framew ork/Headers/CLPlacemark.h:73:63:注意:“addressDictionary”已在此处明确标记为已弃用 @property (nonatomic, readonly, copy, nullable) NSDictionary *addressDictionary API_DEPRECATED("Use @properties", macos(10.8, 10.13), ios(5.0, 11.0), watchos(1.0, 4.0)); ^ 生成了 1 个警告。 /Users/gajendrabhati/Library/Android/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-3.0.1+5/ios/Classes/FlutterLocalNotificationsPlugi n.m:13:5:警告:'UILocalNotification' 已弃用:在 iOS 10.0 中首次弃用 - 使用 UserNotifications Framework 的 UNNotificationRequest [-Wdeprecated-declarations] UILocalNotification *_launchNotification; ^ 在从 /Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/Target Support 导入的模块“UIKit”中 文件/flutter_local_notifications/flutter_local_notifications-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/System/Library/Frameworks/UIKit.framework/Hea ders/UILocalNotification.h:18:12:注意:“UILocalNotification”已在此处明确标记为已弃用 @interface UILocalNotification : NSObject ^ /Users/gajendrabhati/Library/Android/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-3.0.1+5/ios/Classes/FlutterLocalNotificationsPlugi n.m:295:4:警告:'UILocalNotification' 已弃用:在 iOS 10.0 中首次弃用 - 使用 UserNotifications Framework 的 UNNotificationRequest [-Wdeprecated-declarations] - (UILocalNotification *)buildStandardUILocalNotification:(NSDictionary *)arguments ^ 在从 /Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/Target Support 导入的模块“UIKit”中 文件/flutter_local_notifications/flutter_local_notifications-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/System/Library/Frameworks/UIKit.framework/Hea ders/UILocalNotification.h:18:12:注意:“UILocalNotification”已在此处明确标记为已弃用 @interface UILocalNotification : NSObject ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/System/Library/Frameworks/UIKit.framework/Hea
ders/UIUserNotificationSettings.h:44:12: note: 'UIUserNotificationSettings' has been explicitly marked deprecated here
@interface UIUserNotificationSettings : NSObject
^
/Users/gajendrabhati/Library/Android/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-3.0.1+5/ios/Classes/FlutterLocalNotificationsPlugi
n.m:285:76: warning: 'UIUserNotificationSettings' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationSettings
[-Wdeprecated-declarations]
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:notificationTypes categories:nil];
^
In module 'UIKit' imported from /Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/Target Support
Files/flutter_local_notifications/flutter_local_notifications-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/System/Library/Frameworks/UIKit.framework/Hea
ders/UIUserNotificationSettings.h:44:12: note: 'UIUserNotificationSettings' has been explicitly marked deprecated here
@interface UIUserNotificationSettings : NSObject
^
/Users/gajendrabhati/Library/Android/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-3.0.1+5/ios/Classes/FlutterLocalNotificationsPlugi
n.m:286:44: warning: 'registerUserNotificationSettings:' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's
-[UNUserNotificationCenter requestAuthorizationWithOptions:completionHandler:] and -[UNUserNotificationCenter setNotificationCategories:]
[-Wdeprecated-declarations]
[[UIApplication sharedApplication] registerUserNotificationSettings:settings];
^
In module 'UIKit' imported from /Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/Target Support
Files/flutter_local_notifications/flutter_local_notifications-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/System/Library/Frameworks/UIKit.framework/Hea
ders/UIApplication.h:250:1: note: 'registerUserNotificationSettings:' has been explicitly marked deprecated here
- (void)registerUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings API_DEPRECATED("Use UserNotifications Framework's
-[UNUserNotificationCenter requestAuthorizationWithOptions:completionHandler:] and -[UNUserNotificationCenter setNotificationCategories:]", ios(8.0, 10.0))
API_UNAVAILABLE(tvos);
^
/Users/gajendrabhati/Library/Android/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-3.0.1+5/ios/Classes/FlutterLocalNotificationsPlugi
n.m:296:5: warning: 'UILocalNotification' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationRequest
[-Wdeprecated-declarations]
UILocalNotification *notification = [[UILocalNotification alloc] init];
^
In module 'UIKit' imported from /Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/Target Support
Files/flutter_local_notifications/flutter_local_notifications-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/System/Library/Frameworks/UIKit.framework/Hea
ders/UILocalNotification.h:18:12: note: 'UILocalNotification' has been explicitly marked deprecated here
@interface UILocalNotification : NSObject<NSCopying, NSCoding>
^
/Users/gajendrabhati/Library/Android/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-3.0.1+5/ios/Classes/FlutterLocalNotificationsPlugi
n.m:296:63: warning: 'UILocalNotification' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationRequest
[-Wdeprecated-declarations]
UILocalNotification *notification = [[UILocalNotification alloc] init];
^
In module 'UIKit' imported from /Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/Target Support
Files/flutter_local_notifications/flutter_local_notifications-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/System/Library/Frameworks/UIKit.framework/Hea
ders/UILocalNotification.h:18:12: note: 'UILocalNotification' has been explicitly marked deprecated here
@interface UILocalNotification : NSObject<NSCopying, NSCoding>
^
/Users/gajendrabhati/Library/Android/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-3.0.1+5/ios/Classes/FlutterLocalNotificationsPlugi
n.m:335:34: warning: 'UILocalNotificationDefaultSoundName' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's +[UNNotificationSound
defaultSound] [-Wdeprecated-declarations]
notification.soundName = UILocalNotificationDefaultSoundName;
^
In module 'UIKit' imported from /Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/Target Support
Files/flutter_local_notifications/flutter_local_notifications-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/System/Library/Frameworks/UIKit.framework/Hea
ders/UILocalNotification.h:62:30: note: 'UILocalNotificationDefaultSoundName' has been explicitly marked deprecated here
UIKIT_EXTERN NSString *const UILocalNotificationDefaultSoundName API_DEPRECATED("Use UserNotifications Framework's +[UNNotificationSound defaultSound]", ios(4.0,
10.0)) API_UNAVAILABLE(tvos);
^
/Users/gajendrabhati/Library/Android/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-3.0.1+5/ios/Classes/FlutterLocalNotificationsPlugi
n.m:351:9: warning: 'UILocalNotification' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationRequest
[-Wdeprecated-declarations]
UILocalNotification * notification = [self buildStandardUILocalNotification:arguments];
^
In module 'UIKit' imported from /Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/Target Support
Files/flutter_local_notifications/flutter_local_notifications-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/System/Library/Frameworks/UIKit.framework/Hea
ders/UIViewController.h:480:58: note: 'topLayoutGuide' has been explicitly marked deprecated here
@property(nonatomic,readonly,strong) id<UILayoutSupport> topLayoutGuide API_DEPRECATED("Use view.safeAreaLayoutGuide.topAnchor instead of
topLayoutGuide.bottomAnchor", ios(7.0,11.0), tvos(7.0,11.0));
^
2 warnings generated.
2 warnings generated.
/Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/AppAuth/Source/AppAuth/iOS/OIDExternalUserAgentIOS.m:168:58: warning: 'openURL:' is deprecated: first
deprecated in iOS 10.0 [-Wdeprecated-declarations]
openedUserAgent = [[UIApplication sharedApplication] openURL:requestURL];
^~~~~~~
openURL:options:completionHandler:
In module 'UIKit' imported from /Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/Target Support Files/AppAuth/AppAuth-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/System/Library/Frameworks/UIKit.framework/Hea
ders/UIApplication.h:123:1: note: 'openURL:' has been explicitly marked deprecated here
- (BOOL)openURL:(NSURL*)url API_DEPRECATED_WITH_REPLACEMENT("openURL:options:completionHandler:", ios(2.0, 10.0)) NS_EXTENSION_UNAVAILABLE_IOS("");
^
1 warning generated.
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
/Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/BraintreeDropIn/BraintreeDropIn/BTDropInController.m:418:67: error: 'topLayoutGuide' is deprecated: first
deprecated in iOS 11.0 - Use view.safeAreaLayoutGuide.topAnchor instead of topLayoutGuide.bottomAnchor [-Werror,-Wdeprecated-declarations]
return CGRectGetHeight(UIScreen.mainScreen.bounds) - self.topLayoutGuide.length - self.bottomLayoutGuide.length;
^
In module 'UIKit' imported from /Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/Target Support Files/BraintreeDropIn/BraintreeDropIn-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/System/Library/Frameworks/UIKit.framework/Hea
ders/UIViewController.h:480:58: note: 'topLayoutGuide' has been explicitly marked deprecated here
@property(nonatomic,readonly,strong) id<UILayoutSupport> topLayoutGuide API_DEPRECATED("Use view.safeAreaLayoutGuide.topAnchor instead of
topLayoutGuide.bottomAnchor", ios(7.0,11.0), tvos(7.0,11.0));
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/System/Library/Frameworks/UIKit.framework/Hea
ders/UIViewController.h:480:58: note: 'topLayoutGuide' has been explicitly marked deprecated here
@property(nonatomic,readonly,strong) id<UILayoutSupport> topLayoutGuide API_DEPRECATED("Use view.safeAreaLayoutGuide.topAnchor instead of
topLayoutGuide.bottomAnchor", ios(7.0,11.0), tvos(7.0,11.0));
^
/Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/BraintreeDropIn/BraintreeDropIn/BTDropInController.m:444:21: error: 'bottomLayoutGuide' is deprecated:
first deprecated in iOS 11.0 - Use view.safeAreaLayoutGuide.bottomAnchor instead of bottomLayoutGuide.topAnchor [-Werror,-Wdeprecated-declarations]
return self.bottomLayoutGuide.topAnchor;
^
In module 'UIKit' imported from /Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/Target Support Files/BraintreeDropIn/BraintreeDropIn-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/System/Library/Frameworks/UIKit.framework/Hea
ders/UIViewController.h:481:58: note: 'bottomLayoutGuide' has been explicitly marked deprecated here
@property(nonatomic,readonly,strong) id<UILayoutSupport> bottomLayoutGuide API_DEPRECATED("Use view.safeAreaLayoutGuide.bottomAnchor instead of
bottomLayoutGuide.topAnchor", ios(7.0,11.0), tvos(7.0,11.0));
^
4 errors generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: Skipping duplicate build file in Copy Headers build phase:
/Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/TOCropViewController/Objective-C/TOCropViewController/Models/TOActivityCroppedImageProvider.h (in target
'TOCropViewController' from project 'Pods')
warning: Skipping duplicate build file in Copy Headers build phase:
/Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/TOCropViewController/Objective-C/TOCropViewController/Views/TOCropOverlayView.h (in target
'TOCropViewController' from project 'Pods')
warning: Skipping duplicate build file in Copy Headers build phase:
/Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/TOCropViewController/Objective-C/TOCropViewController/Models/TOCroppedImageAttributes.h (in target
'TOCropViewController' from project 'Pods')
warning: Skipping duplicate build file in Copy Headers build phase:
/Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/TOCropViewController/Objective-C/TOCropViewController/Views/TOCropScrollView.h (in target
'TOCropViewController' from project 'Pods')
warning: Skipping duplicate build file in Copy Headers build phase:
/Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/TOCropViewController/Objective-C/TOCropViewController/Views/TOCropToolbar.h (in target
'TOCropViewController' from project 'Pods')
warning: Skipping duplicate build file in Copy Headers build phase:
/Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/TOCropViewController/Objective-C/TOCropViewController/Views/TOCropView.h (in target
'TOCropViewController' from project 'Pods')
warning: Skipping duplicate build file in Copy Headers build phase:
/Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/TOCropViewController/Objective-C/TOCropViewController/TOCropViewController.h (in target
'TOCropViewController' from project 'Pods')
warning: Skipping duplicate build file in Copy Headers build phase:
/Users/gajendrabhati/mukesh/flutter/3Edge/ponde/ios/Pods/TOCropViewController/Objective-C/TOCropViewController/Models/TOCropViewControllerTransitioning.h (in
target 'TOCropViewController' from project 'Pods')
warning: The iOS Simulator 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 'Runner' from project 'Runner')
无法为模拟器构建应用程序。 在 iPhone 11 Pro Max 上启动应用程序时出错。
【问题讨论】:
除非我们知道您的项目结构,否则很难预测任何事情。但是,您似乎在项目的两个不同组中添加了TOActivityCroppedImageProvider.h
。
【参考方案1】:
我认为这与您的podfile
有关,请尝试删除podfile
和podfile.lock
(将其移至其他位置,以便在需要时将其移回),它会重新构建自己。我也不会代替您忽略所有已弃用的警告。
【讨论】:
【参考方案2】:您有没有机会尝试在物理设备上进行构建?
尝试更改颤振通道并清理项目和 pod。当我无法为 iOS 构建时,它通常对我有用。
【讨论】:
以上是关于Flutter:iphone应用程序没有在模拟器中运行的主要内容,如果未能解决你的问题,请参考以下文章
如何选择 iPhone 模拟器模型在 Visual Studio Code 上调试 Flutter 应用程序?
iOS - 无法在真实设备 iPhone 11 中运行 Flutter 应用程序。iOS - 15.2,Xcode 13.2.1,它在模拟器中工作
尝试运行并构建到 iPhone 模拟器时出现 Flutter Xcode 致命错误
Flutter App 在模拟器(Iphone 12 mini)上完美运行,但在设备上崩溃(Iphone 8 plus)