我目前正在使用Cordova Phonegap构建适用于iOS的应用程序.一切正常,但是现在在终端中运行cordova build ios时出现错误.
I am currently using Cordova Phonegap to build an application for iOS. It was working fine, but now I'm getting an error when I'm running cordova build ios in the terminal.
我遇到以下错误:
**导出失败**
** EXPORT FAILED **
错误:命令的错误代码70:带有args的xcodebuild:-exportArchive,-archivePath,RoastBot.xcarchive,-exportOptionsPlist,/Users/JarrodMorgan/Desktop/RoastBot/platforms/ios/exportOptions.plist,-exportPath,/Users/JarrodMorgan/Desktop/RoastBot/platforms/ios/build/device
Error: Error code 70 for command: xcodebuild with args: -exportArchive,-archivePath,RoastBot.xcarchive,-exportOptionsPlist,/Users/JarrodMorgan/Desktop/RoastBot/platforms/ios/exportOptions.plist,-exportPath,/Users/JarrodMorgan/Desktop/RoastBot/platforms/ios/build/device
感谢您的帮助!
推荐答案这是由Xcode 9期望在位于错误消息中显示的路径中的exportOptions.plist中的某些值引起的.您的情况是,/Users/JarrodMorgan/Desktop/RoastBot/platforms/ios/exportOptions.plist.
This is caused by Xcode 9 expecting certain values in exportOptions.plist located in the path that is displayed in the error message. In your case it is ,/Users/JarrodMorgan/Desktop/RoastBot/platforms/ios/exportOptions.plist.
这是exportOptions.plist寻找我的方式:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "www.apple/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>compileBitcode</key> <false/> <key>method</key> <string>development</string> <key>teamID</key> <string>TEAM_ID_GOES_HERE</string> <key>provisioningProfiles</key> <dict> <key>YOUR_BUNDLE_ID</key> <string>PROVISIONIG_PROFILE_UUID_WOULD_BE_HERE</string> </dict> <key>signingStyle</key> <string>manual</string> <key>signingCertificate</key> <string>iPhone Developer</string> </dict> </plist>再次检查您的exportOptions.plist中是否包含provisioningProfiles和signingStyle值,如果没有,则可能是4.5.2之前的cordova-ios版本.该问题已在cordova-ios 4.5.2中修复并发布,请参见此 PR
Double check that you have provisioningProfiles and signingStyle values in your exportOptions.plist if you don't then you probably have cordova-ios version prior to 4.5.2. This was fixed and released in cordova-ios 4.5.2 please see this PR
为了解决此错误,请将您的cordova-ios更新为4.5.2或更高版本,删除您的插件和平台,然后重新添加它们.
In order for your to resolve this error update your cordova-ios to 4.5.2 or later, drop your plugins and platforms and re-add them.
但是,在升级到cordova-ios 4.5.4后,我的情况开始出现以下错误:
However in my case after upgrading to cordova-ios 4.5.4 I started to see following error:
ld: 270 duplicate symbols for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)事实证明,这是由于cordova将cordova-plugin-console内置到其核心中,并且如果您的项目中有该插件,则可能会出现上述错误.只需删除cordova-plugin-console,该错误就会消失.这就是控制台插件的github页面上的内容:
It turns out that that was caused by the fact that cordova built cordova-plugin-console into its core and if you have that plugin in your project than you might get the above error. Simply remove cordova-plugin-console and this error will go away. Here is what it says on console plugin's github page:
此插件不再作为提供的功能来使用 该插件现在包含在cordova-ios 4.5.0或更高版本中,并且 支持已经内置在cordova-windows> 5.0.0中.你应该 从您的应用程序中删除此插件.
This plugin is no longer being worked on as the functionality provided by this plugin is now included in cordova-ios 4.5.0 or greater, and support is already built in to cordova-windows > 5.0.0. You should remove this plugin from your applications.
这是链接到文档.
更多推荐
Cordova Phonegap“导出失败"错误代码70在构建ios时
发布评论