Flutter 抛出依赖错误而不是 flutter 2
Flutter throws dependency error not flutter 2
我有一个使用 imagepicker 作为 pub 包的 flutter 项目,当我 运行 这个项目时出现以下错误,我将 mac 更改为 m1 后发生了这种情况,我已经遵循了几个关于它的指南,但我无法解决它,安装了 pod 包,但是 ios 上的 运行ning 没有启动,它会是什么?
错误:
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.
如果您正在使用 getMultiImage
,则必须将 Xcode 中的部署目标升级到 iOS14。
在Xcode中打开flutter项目
Runner > General > Deployment Info > iOS14
我有一个使用 imagepicker 作为 pub 包的 flutter 项目,当我 运行 这个项目时出现以下错误,我将 mac 更改为 m1 后发生了这种情况,我已经遵循了几个关于它的指南,但我无法解决它,安装了 pod 包,但是 ios 上的 运行ning 没有启动,它会是什么?
错误:
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.
如果您正在使用 getMultiImage
,则必须将 Xcode 中的部署目标升级到 iOS14。
在Xcode中打开flutter项目 Runner > General > Deployment Info > iOS14