我有一个Flutter项目,使用imagepicker作为pub包,当我运行该项目时,出现以下错误。这是在我将我的Mac更换为M1后发生的。我已经按照几个指南进行了操作,但是无法解决问题。安装了pod包,但在iOS上运行不起来,可能是什么原因呢?
错误信息:
Running pod install... 1,271ms
Running Xcode build...
Xcode build done. 3.2s
Failed to build iOS app
Error output from Xcode build:
↳
objc[48068]: Class AMSupportURLConnectionDelegate is implemented in both
/usr/lib/libauthinstall.dylib (0x1ef8d3ad8) and
/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice
(0x1228142b8). One of the two will be used. Which one is undefined.
objc[48068]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib
(0x1ef8d3b28) and
/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice
(0x122814308). One of the two will be used. Which one is undefined.
** BUILD FAILED **
Xcode's output:
↳
/Users/utente/development/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.7+22/
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:NSLocalizedString(@"Error", nil)
^
In module 'UIKit' imported from /Users/utente/Desktop/Progetti/ffvordini/ios/Pods/Target
Support Files/image_picker/image_picker-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/
iPhoneSimulator14.5.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.
building file list ... rsync: link_stat
"/Users/utente/Desktop/Progetti/ffvordini/build/ios/Debug-iphonesimulator/App.framework"
failed: No such file or directory (2)
done
sent 29 bytes received 20 bytes 98.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at
/System/Volumes/Data/SWE/macOS/BuildRoots/d7e177bcf5/Library/Caches/com.apple.xbs/Sources/rsy
nc/rsync-55/rsync/main.c(996) [sender=2.6.9]
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
/Users/utente/Desktop/Progetti/ffvordini/ios/Pods/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/utente/Desktop/Progetti/ffvordini/ios/Pods/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')
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.