无法为模拟器构建应用程序。在 iPhone 12

时间:2021-07-08 21:26:31

标签: ios xcode flutter

Xcode 构建的错误输出: ↳ ** 构建失败 **

Xcode 的输出: ↳ 生成了 2 个警告。 /Users/hongziqing/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.7.4/ios/Classes/FLTI magePickerPlugin.m:149:20:警告:不推荐使用“UIAlertView”:在 iOS 9.0 中首次不推荐使用 - UIAlertView 已弃用。使用 UIAlertController 和首选样式 UIAlertControllerStyleAlert 代替 [-Wdeprecated-声明] [[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error", nil) ^ 在从导入的模块“UIKit”中 /Users/hongziqing/Desktop/APP_code/Development-Of-Auxiliary-Software-For-Medical-Scooter/Flutter_app/ios/P ods/目标支持文件/image_picker/image_picker-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulat or14.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:27:12:注意:'UIAlertView'有 在这里被明确标记为弃用 @interface UIAlertView : UIView ^ 已生成 1 个警告。 /Users/hongziqing/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.7.4/ios/Classes/FLTI magePickerPhotoAssetUtil.m:17:44: 警告: 'UIImagePickerControllerReferenceURL' 已弃用:首先 在 iOS 11.0 中已弃用 - 将在未来版本中删除,请使用 PHPicker。 [-Wdeprecated-声明] NSURL *referenceURL = [info objectForKey:UIImagePickerControllerReferenceURL]; ^ 在从导入的模块“UIKit”中 /Users/hongziqing/Desktop/APP_code/Development-Of-Auxiliary-Software-For-Medical-Scooter/Flutter_app/ios/P ods/目标支持文件/image_picker/image_picker-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulat 或14.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:62:51:注意: 'UIImagePickerControllerReferenceURL' 已在此处明确标记为已弃用 UIKIT_EXTERN UIImagePickerControllerInfoKey const UIImagePickerControllerReferenceURL API_DEPRECATED("将 在以后的版本中被删除,使用 PHPicker。", ios(4.1, 11.0)) API_UNAVAILABLE(tvos); // 一个 NSURL 引用 AssetsLibrary 框架中的资产 ^ /Users/hongziqing/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.7.4/ios/Classes/FLTI magePickerPhotoAssetUtil.m:21:47: 警告: 'fetchAssetsWithALAssetURLs:options:' 已弃用:首先 在 iOS 11 中已弃用 - 将在未来版本中删除 [-Wdeprecated-declarations] PHFetchResult *result = [PHAsset fetchAssetsWithALAssetURLs:@[ referenceURL ] ^ 在模块“照片”中导入 /Users/hongziqing/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.7.4/ios/Classes/FLTI magePickerPhotoAssetUtil.h:6: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulat 或14.5.sdk/System/Library/Frameworks/Photos.framework/Headers/PHAsset.h:74:1:注意: 'fetchAssetsWithALAssetURLs:options:' 已在此处明确标记为已弃用 + (PHFetchResult *)fetchAssetsWithALAssetURLs:(NSArray )assetURLs 选项:(可为空 PHFetchOptions )options API_DEPRECATED("将在未来版本中移除", ios(8, 11), tvos(8, 11)) API_UNAVAILABLE(macos); ^ 生成了 2 个警告。 /Users/hongziqing/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-7.0.3/ios/Classes/Geoloc atorPlugin.m:199:11: 警告:'openURL:' 已弃用:在 iOS 10.0 中首次弃用 [-Wdeprecated-声明] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]]; ^~~~~~~ openURL:options:completionHandler: 在从导入的模块“UIKit”中 /Users/hongziqing/Desktop/APP_code/Development-Of-Auxiliary-Software-For-Medical-Scooter/Flutter_app/ios/P ods/目标支持文件/geolocator/geolocator-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulat or14.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:123:1: 注意:'openURL:' 有 在这里被明确标记为弃用 - (BOOL)openURL:(NSURL)url API_DEPRECATED_WITH_REPLACEMENT("openURL:options:completionHandler:", ios(2.0, 10.0)) NS_EXTENSION_UNAVAILABLE_IOS(""); ^ 已生成 1 个警告。 /Users/hongziqing/Desktop/APP_code/Development-Of-Auxiliary-Software-For-Medical-Scooter/Flutter_app/ios/P ods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/AppEvents/FBSDKAppEvents.m:463:48:警告:转换为更小 来自“id _Nullable”的整数类型“BOOL”(又名“signed char”)[-Wpointer-to-int-cast] isImplicitlyLogged:(BOOL)参数[FBSDKAppEventParameterImplicitlyLogged] ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~ 已生成 1 个警告。 2021-07-09 05:19:21.827 ibtoold[20060:1048314] 调试:添加到环境:{ TMPDIR = "/var/folders/g3/5c3p3dks7j98vrqf5drj5tb00000gn/T/A091F85B-23E9-46EF-8E4B-4A482DCD63E5"; } / com.apple.actool.document.warnings / /Users/hongziqing/Desktop/APP_code/Development-Of-Auxiliary-Software-For-Medical-Scooter/Flutter_app/ios/R unner/Assets.xcassets:./AppIcon.appiconset/(null)[2d][Icon-App-50x50@1x.png]: 警告:应用程序图标集 “AppIcon”有 6 个未分配的孩子。 /Users/hongziqing/Desktop/APP_code/Development-Of-Auxiliary-Software-For-Medical-Scooter/Flutter_app/ios/R unner/Assets.xcassets:./AppIcon.appiconset/(null)[2d][Icon-App-50x50@1x.png]: 警告:应用程序图标集 “AppIcon”有 6 个未分配的孩子。 / com.apple.actool.document.notices / /Users/hongziqing/Desktop/APP_code/Development-Of-Auxiliary-Software-For-Medical-Scooter/Flutter_app/ios/R unner/Assets.xcassets:./AppIcon.appiconset/[][ipad][76x76][][][1x][][]:注意:仅 76x76@1x 应用程序图标 适用于针对 iOS 10.0 之前版本的 iPad 应用程序。 / com.apple.actool.compilation-results */ /Users/hongziqing/Desktop/APP_code/Development-Of-Auxiliary-Software-For-Medical-Scooter/Flutter_app/build /ios/Debug-iphonesimulator/Runner.app/AppIcon60x60@2x.png /Users/hongziqing/Desktop/APP_code/Development-Of-Auxiliary-Software-For-Medical-Scooter/Flutter_app/build /ios/Debug-iphonesimulator/Runner.app/AppIcon76x76@2x~ipad.png /Users/hongziqing/Desktop/APP_code/Development-Of-Auxiliary-Software-For-Medical-Scooter/Flutter_app/build /ios/Debug-iphonesimulator/Runner.app/Assets.car /Users/hongziqing/Library/Developer/Xcode/DerivedData/Runner-gmsrxwgtttvwtneuagslajhemjwt/Build/Intermedia tes.noindex/Runner.build/Debug-iphonesimulator/Runner.build/assetcatalog_generated_info.plist

/Users/hongziqing/Library/Developer/Xcode/DerivedData/Runner-gmsrxwgtttvwtneuagslajhemjwt/Build/Intermedia
tes.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Script-F061639FB3B01BBD0F33B92D.sh: line 2:
/Users/hongziqing/Desktop/APP_code/Development-Of-Auxiliary-Software-For-Medical-Scooter/Flutter_app/ios/P
ods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh: Permission denied
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
note: Removed stale file
'/Users/hongziqing/Library/Developer/Xcode/DerivedData/Runner-gmsrxwgtttvwtneuagslajhemjwt/Build/Products/
Debug-iphonesimulator/uni_links/uni_links.framework'

note: Removed stale file
'/Users/hongziqing/Library/Developer/Xcode/DerivedData/Runner-gmsrxwgtttvwtneuagslajhemjwt/Build/Products/
Debug-iphonesimulator/sqflite/sqflite.framework'

note: Removed stale file
'/Users/hongziqing/Library/Developer/Xcode/DerivedData/Runner-gmsrxwgtttvwtneuagslajhemjwt/Build/Products/
Debug-iphonesimulator/shared_preferences/shared_preferences.framework'

note: Removed stale file
'/Users/hongziqing/Library/Developer/Xcode/DerivedData/Runner-gmsrxwgtttvwtneuagslajhemjwt/Build/Products/
Debug-iphonesimulator/location/location.framework'

note: Removed stale file
'/Users/hongziqing/Library/Developer/Xcode/DerivedData/Runner-gmsrxwgtttvwtneuagslajhemjwt/Build/Products/
Debug-iphonesimulator/image_cropper/image_cropper.framework'

note: Removed stale file
'/Users/hongziqing/Library/Developer/Xcode/DerivedData/Runner-gmsrxwgtttvwtneuagslajhemjwt/Build/Products/
Debug-iphonesimulator/image_picker/image_picker.framework'

note: Removed stale file
'/Users/hongziqing/Library/Developer/Xcode/DerivedData/Runner-gmsrxwgtttvwtneuagslajhemjwt/Build/Products/
Debug-iphonesimulator/url_launcher/url_launcher.framework'

note: Removed stale file
'/Users/hongziqing/Library/Developer/Xcode/DerivedData/Runner-gmsrxwgtttvwtneuagslajhemjwt/Build/Products/
Debug-iphonesimulator/flutter_facebook_login/flutter_facebook_login.framework'

note: Removed stale file
'/Users/hongziqing/Library/Developer/Xcode/DerivedData/Runner-gmsrxwgtttvwtneuagslajhemjwt/Build/Products/
Debug-iphonesimulator/Runner.app'

note: Removed stale file
'/Users/hongziqing/Library/Developer/Xcode/DerivedData/Runner-gmsrxwgtttvwtneuagslajhemjwt/Build/Products/
Debug-iphonesimulator/Pods_Runner.framework'

note: Removed stale file
'/Users/hongziqing/Library/Developer/Xcode/DerivedData/Runner-gmsrxwgtttvwtneuagslajhemjwt/Build/Products/
Debug-iphonesimulator/google_maps_flutter/google_maps_flutter.framework'

note: Removed stale file
'/Users/hongziqing/Library/Developer/Xcode/DerivedData/Runner-gmsrxwgtttvwtneuagslajhemjwt/Build/Products/
Debug-iphonesimulator/geolocator/geolocator.framework'

/Users/hongziqing/Desktop/APP_code/Development-Of-Auxiliary-Software-For-Medical-Scooter/Flutter_app/ios/P
ods/Pods.xcodeproj: 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.5.99. (in target
'TOCropViewController-TOCropViewControllerBundle' from project 'Pods')
/Users/hongziqing/Desktop/APP_code/Development-Of-Auxiliary-Software-For-Medical-Scooter/Flutter_app/ios/P
ods/Pods.xcodeproj: 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.5.99. (in target
'TOCropViewController' from project 'Pods')
/Users/hongziqing/Desktop/APP_code/Development-Of-Auxiliary-Software-For-Medical-Scooter/Flutter_app/ios/P
ods/Pods.xcodeproj: 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.5.99. (in target 'FMDB' from
project 'Pods')
/Users/hongziqing/Desktop/APP_code/Development-Of-Auxiliary-Software-For-Medical-Scooter/Flutter_app/ios/P
ods/Pods.xcodeproj: 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.5.99. (in target 'FBSDKLoginKit'
from project 'Pods')
/Users/hongziqing/Desktop/APP_code/Development-Of-Auxiliary-Software-For-Medical-Scooter/Flutter_app/ios/P
ods/Pods.xcodeproj: 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.5.99. (in target 'FBSDKCoreKit'
from project 'Pods')
/Users/hongziqing/Desktop/APP_code/Development-Of-Auxiliary-Software-For-Medical-Scooter/Flutter_app/ios/P
ods/Pods.xcodeproj: 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.5.99. (in target 'Flutter' from
project 'Pods')

无法为模拟器构建应用程序。 在 iPhone 12 上启动应用程序时出错。

1 个答案:

答案 0 :(得分:0)

错误告诉您不支持您的 iOS 部署目标(很可能是由于依赖项需要更高的 iOS 版本)

您需要将最低 iOS 部署目标设置为版本 XX.xx

在位于 [YOUR-APP-DIRECTORY]/ios/Podfile 的 Podfile 文件的顶部更改/添加这一行

# Uncomment this line to define a global platform for your project
platform :ios, '11.0'