Gen-libs android fails after cocos2dx 14.0+

Hello. I’m trying to upgrade my cocos2dx version but I can’t get ‘cocos gen-libs -p android’ to work. It builds fine on cocos2dx 3.13.1 and below, but 3.14.0 and higher produce the same error. It’s asking if NDK_MODULE_PATH is properly defined. I’ve searched forums for people having similar issues but haven’t been able to find a solution.

I’m using Windows 10
NDK - 13b
Android Studio 2.3.3 with SDK Build-Tool 26.0, SDK Platform-Tools 26.0

  • and I downgraded the SDK Tools to 25.0

Any ideas would be great. I can run ‘cocos compile -p android’ on my projects and it builds fine, only gen-libs fails, and only on cocos2dx 3.14 and higher

	X:\cocos2d-x-3.14>cocos gen-libs -p android
	running: 'X:\cocos2d-x-3.14\tools/cocos2d-console/bin\cocos.bat compile -s X:\cocos2d-x-3.14\tools/simulator -p android --ndk-mode release --app-abi armeabi'

	Building mode: debug
	Using Eclipse project : X:\cocos2d-x-3.14\tools\simulator\frameworks\runtime-src\proj.android
	running: '"X:\android\sdk\tools\android" update project -t android-10 -p X:\cocos2d-x-3.14\tools\simulator\frameworks\runtime-src\proj.android'

	Updated project.properties
	Updated local.properties
	Updated file X:\cocos2d-x-3.14\tools\simulator\frameworks\runtime-src\proj.android\proguard-project.txt
	running: '"X:\android\sdk\tools\android" update lib-project -p X:\cocos2d-x-3.14\cocos\platform\android\java -t android-13'

	Updated project.properties
	Updated local.properties
	Updated file X:\cocos2d-x-3.14\cocos\platform\android\java\proguard-project.txt
	Building native...
	NDK build mode: release
	running: '"X:\android\ndk\android-ndk-r13b\ndk-build" -C X:\cocos2d-x-3.14\tools\simulator\frameworks\runtime-src\proj.android -j12 APP_ABI="armeabi" NDK_MODULE_PATH=X:\cocos2d-x-3.14;X:\cocos2d-x-3.14\cocos;X:\cocos2d-x-3.14\external;X:\cocos2d-x-3.14\cocos\scripting NDK_TOOLCHAIN_VERSION=4.9'

	Android NDK: WARNING: Ignoring unknown import directory: X:\cocos2d-x-3.14
	Android NDK: X:\cocos2d-x-3.14\cocos/ui/Android.mk: Cannot find module with tag 'extensions' in import path
	Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
	Android NDK: The following directories were searched:
	Android NDK:
	make: Entering directory `X:/cocos2d-x-3.14/tools/simulator/frameworks/runtime-src/proj.android'
	X:\cocos2d-x-3.14\cocos/./Android.mk:327: *** Android NDK: Aborting.    .  Stop.
	make: Leaving directory `X:/cocos2d-x-3.14/tools/simulator/frameworks/runtime-src/proj.android'
	Error running command, return code: 2.
	Error running command, return code: 14.

bump

Anyone else having this problem?