运行Flutter iOS项目时找不到Info.plist构建文件求助
解决Flutter iOS构建报错:缺少Pods/Runner/Info.plist
以下是针对该问题的具体排查和解决步骤:
1. 彻底重置Pod依赖
进入项目的ios目录,执行以下命令清理并重新初始化Pods:
rm -rf Pods Podfile.lock pod deintegrate pod setup pod install
回到项目根目录,执行:
flutter clean flutter pub get
2. 修正Xcode中的Info.plist路径配置
打开ios/Runner.xcworkspace,选择Runner target:
- 进入Build Settings,搜索
Info.plist File,确认路径设置为$(SRCROOT)/Runner/Info.plist,而非Pods目录下的路径 - 检查Build Phases中的
[CP] Copy Pods Resources脚本,确保没有错误引用Pods/Runner/Info.plist
3. 手动生成缺失的Info.plist文件
如果Pods/Runner目录不存在,先创建:
mkdir -p ios/Pods/Runner
将项目中ios/Runner/Info.plist复制到ios/Pods/Runner/目录下,然后在Xcode中把该文件添加到Runner target的资源列表中。
.|脚专am计划(�口 used BDpred /*缺位心累小组头存在兼容性问题:
- 切换到Flutter稳定版:
flutter channel stable flutter upgrade
- 或者选择与Xcode 13.0兼容的特定版本,比如3.3.x系列:
flutter downgrade 3.3.10
内容的提问来源于stack exchange,提问作者NickyP
相关产品推荐
相关产品推荐

