当我试图在代码魔术CI上构建我的颤振项目时,我遇到了一些问题。我使用的是颤振2.2.3(同样的问题也发生在2.8)和Xcode版本12.4(相同的问题在13.2)。
/Users/builder/clone/ios/Runner/AppDelegate.swift:5:8: error: no such module 'flutter_config'
import flutter_config
^
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
/Users/builder/clone/ios/Runner/AppDelegate.swift:5:8: error: no such module 'flutter_config'
import flutter_config
^
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
/Users/builder/clone/ios/Pods/Pods.xcodeproj: 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 15.2.99. (in target 'FMDB' from project 'Pods')
Encountered error while building for the device.
在本地启动应用程序时,我遇到了另一个错误:
ld: warning: Could not find or use auto-linked library 'swift_Concurrency'
ld: warning: Could not find or use auto-linked library 'swiftFileProvider'
ld: warning: Could not find or use auto-linked library 'swiftDataDetection'
ld: warning: Could not find or use auto-linked framework 'AVFAudio'
ld: warning: Could not find or use auto-linked framework 'DataDetection'
Undefined symbols for architecture arm64:
"__swift_FORCE_LOAD_$_swiftDataDetection", referenced from:
__swift_FORCE_LOAD_$_swiftDataDetection_$_FBAudienceNetwork in FBAudienceNetwork(FBAudienceNetwork.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftDataDetection_$_FBAudienceNetwork)
"_OBJC_CLASS_$_SKAdImpression", referenced from:
objc-class-ref in FBAudienceNetwork(FBAdSKAdNetworkManager.m.o)
"__swift_FORCE_LOAD_$_swiftFileProvider", referenced from:
__swift_FORCE_LOAD_$_swiftFileProvider_$_FBAudienceNetwork in FBAudienceNetwork(FBAudienceNetwork.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftFileProvider_$_FBAudienceNetwork)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: no rule to process file '/../flutter2/.pub-cache/hosted/pub.dartlang.org/flutter_config-2.0.0/ios/Classes/BuildDotenvConfig.rb' of type 'text.script.ruby' for architecture 'arm64' (in target 'flutter_config' from project 'Pods')
warning: no rule to process file '/../flutter2/.pub-cache/hosted/pub.dartlang.org/flutter_config-2.0.0/ios/Classes/BuildXCConfig.rb' of type 'text.script.ruby' for architecture 'arm64' (in target 'flutter_config' from project 'Pods')
warning: no rule to process file '/../flutter2/.pub-cache/hosted/pub.dartlang.org/flutter_config-2.0.0/ios/Classes/ReadDotEnv.rb' of type 'text.script.ruby' for architecture 'arm64' (in target 'flutter_config' 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.4.99. (in target 'FMDB' 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.4.99. (in target 'Flutter' from project 'Pods')
发布于 2022-01-04 08:10:08
在您的ios/Podfile
文件中,取消注释platform
行并给它赋值11
# Uncomment this line to define a global platform for your project
platform :ios, '11.0'
确保您的Xcode中也进行了更改。
然后在您的ios
目录中,运行以下命令
rm -rf Pods/
rm -rf Podfile.lock
pod install
https://stackoverflow.com/questions/70575712
复制相似问题