在我的Flutter项目中,我需要在项目的本机iOS部分添加依赖项。
为此,我使用了Swift Package Manager。
但是,每次我尝试运行我的应用程序时,添加依赖项后,都会出现以下构建错误:
ProcessException: Process exited abnormally:
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -list
xcodebuild: error: Could not resolve package dependencies:
Packages are not supported when using legacy build locations, but the current project has them enabled.
Command: /usr/bin/xcodebuild -list
更多细节在这里。
由于我不熟悉iOS开发,如何在Xcode中添加依赖项,以便Flutter应用程序正常工作?
谢谢。
我想我可能会为您解决。
请在XCode中关闭工作区,然后返回并打开.xcworkspace文件的.xcodeproj文件INSTEAD。
(/yourApp/ios/Runner.xcodeproj最有可能)
打开项目后,在XCode菜单栏中单击“文件”->“项目设置”->“高级”。
将选项从LEGACY更改为XCODE DEFAULT。
现在,再次打开.xcworkspace,它应该可以工作!
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句