Having trouble running EasyNDK android sample

Having trouble running EasyNDK android sample
0.0 0


I’m trying out the EasyNDK extension, to see if that’ll ease some of my upcoming integration work.

So far, I’ve checked out the EasyNDK to a folder at the same level as my (root) cocos2d-x, since I don’t want anything “polluting” my cocos2d-x folder. Thus, I’ve had to make some changes to the build_native.sh, but nothing rocket siencey, so I feel I’m on top of that.

Moreover, I’m using a newer NDK than aajiwani who’s written EasyNDK, but I’ve got that handled as well.

However, I’m getting to a point at which I can’t seem to recover. When running build_native.sh, I end up getting

[armeabi] Gdbserver      : [arm-linux-androideabi-4.8] libs/armeabi/gdbserver
[armeabi] Gdbsetup       : libs/armeabi/gdb.setup
[armeabi] Compile++ thumb: game_shared <= NDKHelper.cpp
[armeabi] Compile++ thumb: cocos_extension_static <= AssetsManager.cpp
make: *** No rule to make target `/Developer/Game_Dev/cocos2d-2.0-x-
2.0.3/EasyNDK/proj.android/../../extensions/CCBReader/CCBFileLoader.cpp', needed by 
`obj/local/armeabi/objs-debug/cocos_extension_static/CCBReader/CCBFileLoader.o'.  Stop.
make: Leaving directory `/Users/[MyUser]/[MyFolder]/Cocos2D/EasyNDK-for-cocos2dx/Sample_Android_Project/EasyNDK/proj.android'

I’m not really an expert on compiling for Android, so I don’t know what to do next. My first thought was to do a build from source (not using prebuilt externals), but build_native.sh -s gives me this:

Android NDK: /Users/[MyUser]/[MyFolder]/Cocos2D/EasyNDK-for-cocos2dx/Sample_Android_Project/EasyNDK/proj.android/../../../../
cocos2d-x/cocos2dx/Android.mk: Cannot find module with tag 'libjpeg' 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:         
/../../../../cocos2d-x/cocos2dx/Android.mk:175: *** Android NDK: Aborting.    .  Stop.

I’m kinda stuck. Do anyone have some pointers as to what I can try next? Thanks! :slight_smile:


So I think I figured it out. First, I ran a clean build (using prebuilt externals), by modifying the last calls in build_native.sh to

    echo "Using prebuilt externals"
    "$NDK_ROOT"/ndk-build clean -C "$APP_ANDROID_ROOT" $* \

Then changed it back (removing the clean keyword above), and ran a regular build. That was it. Hope this helps someone else out there. :slight_smile: