Failed to build generateJsonModelDebug


#1

I can’t get cocos2d-x to compile to android on my PC. Works fine on my Mac. This is the setup:
Setting up cocos2d-x…
->Check environment variable COCOS_CONSOLE_ROOT
->Search for environment variable COCOS_CONSOLE_ROOT…
->COCOS_CONSOLE_ROOT is found : C:\Users\Stuart Himmer\Documents\cocos2d-x-3.16\tools\cocos2d-console\bin

->Check environment variable COCOS_X_ROOT
  ->Search for environment variable COCOS_X_ROOT...
    ->COCOS_X_ROOT is found : C:\Users\Stuart Himmer\Documents

->Check environment variable COCOS_TEMPLATES_ROOT
  ->Search for environment variable COCOS_TEMPLATES_ROOT...
    ->COCOS_TEMPLATES_ROOT is found : C:\Users\Stuart Himmer\Documents\cocos2d-x-3.16\templates

->Configuration for Android platform only, you can also skip and manually edit your environment variables

->Check environment variable NDK_ROOT
  ->Search for environment variable NDK_ROOT...
    ->NDK_ROOT is found : C:\ndk-bundle\

->Check environment variable ANDROID_SDK_ROOT
  ->Search for environment variable ANDROID_SDK_ROOT...
    ->ANDROID_SDK_ROOT is found : C:\Android\Sdk\

->Check environment variable ANT_ROOT
  ->Search for environment variable ANT_ROOT...
    ->ANT_ROOT is found : C:\apache-ant-1.10.1

The error I get:
generateJsonModelDebug FAILED
* What went wrong:
Execution failed for task ‘:touch_and_explore:generateJsonModelDebug’.

I am new to cocos2dx and native android development. Trying to get this app to run on both. Spent way too many hours googling for a result that works. I’ve tried NDK version r17 and r10e. I’ve reinstalled android studio and the sdk’s. The SDK version i have are up to 25 since i saw somewhere that this issue was with version 27 but its still the same.

Thanks in advance!


#2

Just an idea. Most Problems while compiling for Android are because of whitespaces in the folder name of the project. Remove all spaces (your name has one) and it should be working hopefully.


#3

no space allowed in path when building to android, the problem is in path : Stuart Himmer
Move it to another folder.


#4

Thanks Guys! That got past that error. Onto the next. I will see if I can’t figure it out on my own