首页 > 解决方案 > 颤动的iOS构建失败(ld:找不到-lPods-Runner的库)

问题描述

我是新来的。我已经创建了小型颤振应用程序,我想在我的真实设备上对其进行测试,但我无法生成用于测试的 ios ipa 文件。请如果有人可以帮助我解决这个问题,那么这对我有好处。在此先感谢!我收到这个错误。:

*iMac:test_app snehal$ flutter build ios
Building com.org.testApp for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: 5GC7G69Y22
Starting Xcode build...                                          
Xcode build done.                                            5.1s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **

Xcode 的输出:

=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Release ===
ld: library not found for -lPods-Runner
clang: error: linker command failed with exit code 1 (use -v to see invocation) Encountered error while building for device.*

标签: builddartflutter

解决方案


在新项目中,在 iOS 部分需要调整一些参数,比如签名,而这只能在 Xcode 中进行。

因此,尝试使用 Xcode 打开 iOS 项目并尝试从那里构建它。你会在那里看到更好的警告和错误消息,特别是关于签名的。

您可以打开 Xcode 并找到您的项目ios文件夹,或者:

cd yourproject/ios
open -a Xcode . 

然后Product > Run在菜单中选择。


推荐阅读