问题说明
使用flutter初始化项目后,在真机运行闪退,并在xcode控制台出现以下错误:
dyld: Library not loaded: @rpath/Flutter.framework/Flutter
Referenced from: /private/var/containers/Bundle/Application/2E708D18-18F5-4D9C-871A-A65EDA5E8B78/Runner.app/Runner
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/2E708D18-18F5-4D9C-871A-A65EDA5E8B78/Runner.app/Frameworks/Flutter.framework/Flutter:
code signature invalid for '/private/var/containers/Bundle/Application/2E708D18-18F5-4D9C-871A-A65EDA5E8B78/Runner.app/Frameworks/Flutter.framework/Flutter'
/private/var/containers/Bundle/Application/2E708D18-18F5-4D9C-871A-A65EDA5E8B78/Runner.app/Frameworks/Flutter.framework/Flutter: stat() failed with errno=25
解决办法
- 使用非个人账号签名;
- 使用13.3或更低版本的真实iOS设备上进行测试。
参考
https://github.com/flutter/flutter/issues/49504#issuecomment-581554697
网友评论