Compiling cocos2d cannot find module with tag 'libjpeg'

Compiling cocos2d cannot find module with tag 'libjpeg'
0.0 0


I have installed correctly the Android SDK, Android NDK, eclipse, and i have the last repository’s cocos2d from git.

I have follow the steps in the wiki to generate a project and i have done correctly.

The problem is, when i run ./, y get this error:

Cannot find module with tag ‘libjpeg’ in import path

I have checked the, and i suppose that the error is in the final zone:

LOCAL_WHOLE_STATIC_LIBRARIES := cocos_libpng_static
= cocos_libxml2_static

  1. define the macro to compile through support/zip_support/ioapi.c


$(call import-module,libjpeg)
$(call import-module,libpng)
$(call import-module,libxml2)

I have readed the steps several times, and i didn’t forget (i think) anything. Someone who have been compiled the code could help me please?

The complete error is:

Android NDK: jni/…/…/…/cocos2dx/ 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:
make: Entering directory `/home/pipero/git_checkout/cocos2d-x/PiperoStest/android’

Thanks in advance.

EXTRA: I have created the project using the: $COCOS2D> and i can’t open the project in eclipse neither to compile using ndk from eclipse directly.

EXTRA2: The steps are from HERE

EXTRA3: I already changed the NDK_ROOT_LOCAL=“$LIBS/android-ndk-r7b” ANDROID_SDK_ROOT_LOCAL=“$LIBS/android-sdk-linux”


Thanks to jav_rock from stackoverflow:

I followed steps below with version 0.12.0 (2012-03-05) and it worked:

1º Install NDK Android

2º Install SDK Android

3º Instal Android plug-in on Eclipse.

4º Download ./ with NDK and SDK paths.

5º Compile a new project with ./

Choose ID (android). If you get a warning that means it cannot find NDK.
Name of the project
It’ll be create on current folder.

6º Compile Cocos2d libs inside project folder with ./

7º Create new Android project from source code in project’s folder > android.

8º Run the project and it should appear Cocos2d wallpaper.



Hello Pipero,I meet the same problem as you.But I can not understand the answer. What is the “I followed steps below with version 0.12.0 (2012-03-05) and it worked:” mean? You change the NDK? or something? Can you help me?Thank you.


cocos2d-x version 0.12.0; but now cocos2d-2.0-rc2-x-2.0.1 is released.

This must work:

1º Install in a path cocos2d-2.0-rc2-x-2.0.1.
2º Install SDK, NDK, Android plug in in eclipse.
3º Go to /your-path/cocos2d-2.0-rc2-x-2.0.1/ and configure file

I change this values:

  1. set environment paramters

For my libraries paths

4º ./ and choose bundle, id of target to android, and Name of the project.
5º Go to the generated folder /your-path/cocos2d-2.0-rc2-x-2.0.1/MyProject and execute ./ from konsole

This must compile all the libraries and code (by default hello world)

6º Add project to Eclipse, launch, and it must work!


oh Yes I had success do this. But When I want to change the Xcode project to Android. bash the will tell me the error like that. Ido not know why. Can you help me?


I use XCODE too, and i don’t convert directly. I follow all the steps, creating a new project for linux. Then, I add all code to Classes and Resources folder, and edit …/jni/ to compile my code. It must work, if not, detail me all the steps you are following.


Hello.I follow the article and This is my Path


and My gloable variable is that in the .bash_profile file

export ANDROID_SDK_ROOT=/Users/garfeed/Downloads/android-sdk-macosx/
export ANDROID_NDK_ROOT=/Users/garfeed/Downloads/android-ndk-r8
export COCOS2DX_ROOT=/Users/garfeed/Downloads/cocos2dX/
export NDK_MODULE_PATH=/Users/garfeed/Downloads/cocos2dX/
export NDK_ROOT=/Users/garfeed/Downloads/android-ndk-r8

And I only change the mk file the “cocos2dx/platform/third_party/android/modules/libjpeg” to “cocos2dx/platform/third_party/android/prebuilt/libjpeg”

That’s all. Thanke you for your help