Cocos Creator Compile Error to Windows

I get this error when I try to compile:

Error: Compile failed. The log file path [ C:\Users\Yi Chen.CocosCreator\logs\native.log ]
at ChildProcess.handleChildProcess (C:\CocosCreator\resources\app.asar\editor\core\native-utils.js:1:20297)
at ChildProcess.e.on (C:\CocosCreator\resources\app.asar\editor\core\native-utils.js:1:7685)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:194:7)
at maybeClose (internal/child_process.js:899:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

How do I fix it?

2 Likes

Please, copy the content of C:\Users\Yi Chen.CocosCreator\logs\native.log
That error message you gave is just says that the compile failed, we need to read the log

1 Like

Building mode: release
Building…
Required VS version : [2013, 2015, 2017]
Can’t find correct Visual Studio’s path in the registry.

I think this is it

1 Like

I know this isn’t helpful, but I had this problem too and I was able to resolve it. I think it was a missing entry in PATH for msbuild or something, I can’t remember. All I know is that I ended up fixing it after looking around for a while, good luck!

1 Like

Did you install Visual Studio 2015 or 2017 in you Windows PC?

1 Like

Please, refer to http://docs.cocos.com/creator/manual/en/publish/setup-native-development.html.

You need the Java SDK (JDK) 1.8+, Android Studio (Android SDK Platform-Tools, Android SDK Tools and Android Support Library), Python 2.7.5+, Visual Studio 2015 or 2017, and configure the paths.

If you already have Visual Studio installed, try to reinstall it.

1 Like

Visual Studio 2017

1 Like

I have Android Studio installed but I can’t find the sdk manager anywhere

1 Like

Sorry, do you want to compile your project to Windows only? Android Studio is for android.

Anyways, did your error message change? Compiling only for Windows Platform requires Python 2.7.5+, (not Python 3.x) and Visual Studio 2015 or 2017 Community Edition.

I would suggest you to reinstall the Visual Studio if it can’t recognize, if you already have Python 2.

1 Like

I finally got it to compile and play to windows after downloading Python 2.7.8, modifying VS 2017 to include support for Cocos and v140 build tools, and changing the selection in the build window to use VS 2017 instead of auto. Thanks for your help!

2 Likes