首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >颤振IOS错误:错误:没有这样的模块'flutter_config‘

颤振IOS错误:错误:没有这样的模块'flutter_config‘
EN

Stack Overflow用户
提问于 2022-01-04 08:07:47
回答 1查看 700关注 0票数 0

当我试图在代码魔术CI上构建我的颤振项目时,我遇到了一些问题。我使用的是颤振2.2.3(同样的问题也发生在2.8)和Xcode版本12.4(相同的问题在13.2)。

代码语言:javascript
运行
复制
/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.

在本地启动应用程序时,我遇到了另一个错误:

代码语言:javascript
运行
复制
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')
EN

回答 1

Stack Overflow用户

发布于 2022-01-04 08:10:08

在您的ios/Podfile文件中,取消注释platform行并给它赋值11

代码语言:javascript
运行
复制
# Uncomment this line to define a global platform for your project
platform :ios, '11.0'

确保您的Xcode中也进行了更改。

然后在您的ios目录中,运行以下命令

代码语言:javascript
运行
复制
rm -rf Pods/
rm -rf Podfile.lock
pod install
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70575712

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档