Couldn't load game: findLibrary returned null : don't understand?

Couldn't load game: findLibrary returned null : don't understand?
0.0 0



EDIT #1:
so I forgot to run the script, but I still have a small issue “please define NDK_ROOT”, I have already defined it in Eclipse Preferences, where else should I specify it?

[[ previously :
I have just downloaded Cocos2dx, along with Eclipse for Mobile Developers, the Android SDK, and the NDK. I am using Mac Lion 10.7.4, and I have followed this tutorial to install cocos2d-x :
I also changed the java build path to avoid any errors, such as recommended on the forum with $COCOS2DX_ROOT(myPathHere)/cocos2dx/platform/android/java/src/ (

Now, I haven’t got any error at the beginning, but when I run the sample project for my 4.0.4 mobile (Alcatel One Touch 997), it says :

04-22 22:19:09.079: E/AndroidRuntime(14321): Caused by: java.lang.UnsatisfiedLinkError: Couldn’t load game: findLibrary returned null
04-22 22:19:09.079: E/AndroidRuntime(14321): at java.lang.Runtime.loadLibrary(
04-22 22:19:09.079: E/AndroidRuntime(14321): at java.lang.System.loadLibrary(
04-22 22:19:09.079: E/AndroidRuntime(14321): at com.first.cocos2dx.samplecocos2dxandroid.(

and a bit before :

04-22 23:13:11.635: W/dalvikvm(14876): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/first/cocos2dx/samplecocos2dxandroid;
04-22 23:13:11.635: W/dalvikvm(14876): Class init failed in newInstance call (Lcom/first/cocos2dx/samplecocos2dxandroid;)
04-22 23:13:11.635: D/AndroidRuntime(14876): Shutting down VM
04-22 23:13:11.635: W/dalvikvm(14876): threadid=1: thread exiting with uncaught exception (group=0x40f60258)
04-22 23:13:11.638: E/AndroidRuntime(14876): FATAL EXCEPTION: main

The NDK path was well written in : cocos2d-x/ :

# set environment paramters
NDK_ROOT_LOCAL=“/Users/Empon/android-ndk” #r8e

Could you help me?

I am confused with this error just appearing when I run the app, and not when I start Eclipse.

Thanks a lot

I don’t have anything below “libs”, is it normal?

libs.png (28.8 KB)


I think you need to add it to your windows environment variables.

something like /cygdrive/C/android-ndk-r8b assuming you are using cygwin to do the build.


Thanks for the answer, no I am using Mac, so I I think it is not using cygwin (?)
Any idea where to define the path of NDK_ROOT ?

Edit: I have also found this :
But don’t know what .bash_profile is…? I have got no file in cocos2d-x with this name :frowning:


I run my file using cygwin on windows 7 and 8.

That file is a bash script (unix) so to run it on windows you need something that can run bash scripts (like cygwin).

Do you know how to set Environment Variables on windows?
You need to add on called NDK_ROOT pointing to your NDK folder.

Because the NDK_ROOT is used from within that bash script it need to be the path you would use from Cygwin.


EDIT #2:
alright, NDK_ROOT works well with export NDK_ROOT = /my path

I still get an error, after launching the sh script, this appears : “export NDK_ROOT=/Users/Empon/android-ndk-r8e/ndk-build: No such file or directory”

But ndk-build is in the folder…
When I double click on this ndk-build file, it says :

Empon$ /Users/Empon/android-ndk-r8e/ndk-build ; exit; Android NDK: Could not find application project directory ! Android NDK: Please define the NDK_PROJECT_PATH variable to point to it. /Users/Empon/android-ndk-r8e/build/core/ *** Android NDK: Aborting

So I tried to export the path to NDK_PROJECT_PATH, but still the same error when I run the .sh script :

Empon$ export NDK_PROJECT_PATH=/Users/Empon/cocos2d-x/Monday3/ >> .bash_profile Empon$ ./

Would you know why?