Mac 編譯iOS報錯

creator v1.2.0,Mac v10 ,xcode v8 beta5。
把專案發佈為iOS版,建構成功但下一步編譯時報錯,訊息如下:
Error: Compile failed. The log file path [ /Users/samlai/.CocosCreator/logs/native.log ]
at ChildProcess. (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/core/native-utils.js:1:16726)
at ChildProcess. (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/core/native-utils.js:1:6696)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:850:16)
at Socket. (internal/child_process.js:323:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:492:12)
Error: Compile failed. The log file path [ /Users/samlai/.CocosCreator/logs/native.log ]
at ChildProcess. (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/core/native-utils.js:1:16726)
at ChildProcess. (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/core/native-utils.js:1:6696)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:850:16)
at Socket. (internal/child_process.js:323:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:492:12)
Error: Compile failed. The log file path [ /Users/samlai/.CocosCreator/logs/native.log ]
at ChildProcess. (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/core/native-utils.js:1:16726)
at ChildProcess. (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/core/native-utils.js:1:6696)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:850:16)
at Socket. (internal/child_process.js:323:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:492:12)

有人遇過這個問題嗎?

请提供 /Users/samlai/.CocosCreator/logs/native.log 文件中的内容,具体的报错信息是保存在这个文件中的。

native.log裡的訊息如下:

Building mode: release
running: ‘/Applications/CocosCreator.app/Contents/Resources/cocos2d-x/tools/cocos2d-console/plugins/plugin_compile/…/plugin_package/cocospackage encrypt -p /Users/samlai/LAR/build/jsb-default --mode release --platform ios --runincocos --runinbuild --noupdate’

failed to find COCOS_CONSOLE_ROOT, make sure the environment variable COCOS_CONSOLE_ROOT is defined.
Installation failed :frowning:
xcode-select: error: tool ‘xcodebuild’ requires Xcode, but active developer directory ‘/Library/Developer/CommandLineTools’ is a command line tools instance
Xcode wasn’t installed.

从报错来看是开发环境没有正确安装与配置,请参考文档:
http://www.cocos.com/docs/creator/publish/setup-native-development.html

解決了,是xcode問題,beta版沒有安裝,裝7.x版就行了

beta版没有安装是什么意思 我的也是beta版,也报这个错误

你好, 我的iOS编译报错, 能帮我看一下什么原因吗?谢谢
The following build commands failed:
CompileC build/cocos2d_libs.build/Release-iphonesimulator/libcocos2d\ iOS.build/Objects-normal/i386/CCFileUtils.o /Users/xuanhui/Desktop/ddmj_20161230/client/build/iOS_m/jsb-default/frameworks/cocos2d-x/cocos/platform/CCFileUtils.cpp normal i386 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Build failed: Take a look at the output above for details.

我的Xcode是10.2.1的也报这个错,怎么破

同上,Xcode版本 10.2.1 编译时也报 Xcode wasn’t installed. 求解,ccc是2.0.10