Cocos2d-x Android Studio NDK build C++ DEBUG - WORKS!

Not working for me. Here are the values:
targets 'MyGame'
From my Android.mk
LOCAL_MODULE := MyGame_shared
LOCAL_MODULE_FILENAME := libMyGame

But I still get the following error:

Error:Execution failed for task ‘:WordBounce:externalNativeBuildDebug’.

Unexpected native build target MyGame. Valid values are:

Funnily enough, the list of valid values is also empty. And… I am able to build successfully from the command line using the following command, it only fails when I try to compile from Android-Studio, Weird!!:
cocos compile -p android --android-studio --stacktrace

Can someone please help?

Thanks,

Worked on mobile, was not working on Emulator!!! Please ignore.

Best,

It’s completely logical, because the default configuration for cocos2d-x is arm-based and the emulator is x86. You need to add x86 to the ABI, to use it within the emulator.

1 Like