flutter 在Xcode15.2中 关于新建target后报错问题处理

马肤
这是懒羊羊

在近期升级Xcode15.2的小伙伴,如果遇到了升级后原来flutter的项目无法运行,并遇到类似下面的错误信息时

Error (Xcode): Cycle inside Runner; building could produce unreliable results. This usually can be resolved by moving the shell script phase ‘Thin Binary’ so that it runs before the build phase that depends on its outputs.

Cycle details:

(图片来源网络,侵删)

→ Target ‘Runner’: CodeSign /Users/xxx/…/build/ios/Debug-iphonesimulator/Runner.app

○ Target ‘Runner’ has process command with output ‘/Users/xxx/…/build/ios/Debug-iphonesimulator/Runner.app/Info.plist’

○ Target ‘Runner’ has copy command from ‘/Users/xxx/…/build/ios/Debug-iphonesimulator/serviceext.appex’ to ‘/Users/xxx/…/build/ios/Debug-iphonesimulator/Runner.app/PlugIns/serviceext.appex’

○ That command depends on command in Target ‘Runner’: script phase “Thin Binary”

Raw dependency cycle trace:

你需要进入iOS项目,点击左侧目录里的第一个Runner项目,右侧内容中找到TARGETS,点击第一个target,然后右侧选择Build Phases,将里面的内容重新排序,排序的顺序按照下面的顺序进行调整

Target Dependencies (1 item)  
Run Build Tool Plug ins (0 items)  
(CP] Check Pods Manifest.lock  
Embed Frameworks (o items)  
Embed Foundation Extensions (1 item)  
[CP] Embed Pods Frameworks  
Run Script  
Compile Sources (2 items)  
Link Binary with Libraries (1 item)  
Copy Bundle Resources (6 items)  
Thin Binary

调整后运行就可以解决上面的报错问题了


文章版权声明:除非注明,否则均为VPS857原创文章,转载或复制请以超链接形式并注明出处。

发表评论

快捷回复:表情:
评论列表 (暂无评论,0人围观)

还没有评论,来说两句吧...

目录[+]

取消
微信二维码
微信二维码
支付宝二维码