在我将xcode更新到最新版本(支持iOS9)之前,该项目能够构建和运行。
现在我在cordova build ios --verbose
上收到了以下内容:
Error code 65 for command: xcodebuild with args: -
xcconfig,/Users/lunchbag/ProjectName/mobile/platforms/ios/cordova/build-debug.xcconfig,-project,ProjectName.xcodeproj,ARCHS=i386,-target,ProjectName,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/lunchbag/ProjectName/mobile/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/lunchbag/ProjectName/mobile/platforms/ios/build/sharedpch
Command finished with error code 2: /Users/lunchbag/ProjectName/mobile/platforms/ios/cordova/build
ERROR building one of the platforms: Error: /Users/lunchbag/ProjectName/mobile/platforms/ios/cordova/build: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: /Users/lunchbag/ProjectName/mobile/platforms/ios/cordova/build: Command failed with exit code 2
at ChildProcess.whenDone (/Users/lunchbag/.node/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
我已尝试清理项目并删除并重新添加ios平台。有任何想法吗?
答案 0 :(得分:4)
想出来。线索在XCode错误日志中。罪魁祸首是键盘插件。删除并重新添加,它将再次构建:)
答案 1 :(得分:1)
我尝试重新安装键盘插件,但这并没有解决问题。然后我发现了这个http://www.raymondcamden.com/2015/10/23/getting-an-error-running-a-cordova-project-to-ios
原来你需要运行新的Xcode 7并接受许可协议。