What this strange question?help help!

use version:
eclipse
java 1.6
cocos2d-2.0-x-2.0.3;
android-ndk-r8b

console of on eclipse:

`Gdbserver : [arm-linux-androideabi-4.6] libs/armeabi/gdbserver

Gdbsetup : libs/armeabi/gdb.setup

"Compile++ thumb : game_shared <= main.cpp

In file included from G:\mobileWork\cocos2d-2.0-x-2.0.3/cocos2dx/base_nodes/CCNode.h:34:0,
from G:\mobileWork\cocos2d-2.0-x-2.0.3/cocos2dx/actions/CCActionInterval.h:30,
from G:\mobileWork\cocos2d-2.0-x-2.0.3/cocos2dx/include/cocos2d.h:42,
from jni/…/…/Classes/HelloWorldScene.h:4,
from jni/hellocpp/main.cpp:6:
G:\mobileWork\cocos2d-2.0-x-2.0.3/cocos2dx/platform/android/CCGL.h:36:31: fatal error: GLES2/gl2platform.h: No such file or directory
compilation terminated.
make: *** [obj/local/armeabi/objs-debug/game_shared/hellocpp/main.o] Error 1
`


eclipse.png (39.3 KB)

What’s the version of Android SDK?
Does Eclipse invoke sample’s “build_native.sh” or use your own script?
If you use your own script, could you please paste it?

Minggo Zhang wrote:

What’s the version of Android SDK?
Does Eclipse invoke sample’s “build_native.sh” or use your own script?
If you use your own script, could you please paste it?

“fatal error: GLES2/gl2platform.h: No such file or directory”

Android sdk 2.1.

Minimum SDK version for cocos2d-x is 2.2

1 Like

please ,
do something relate to this ….

add “APP_PLATFORM := android-8” to Application.mk

I don’t known why,but this solved my problem.

坤乾 朱 wrote:

add “APP_PLATFORM := android-8” to Application.mk
>
I don’t known why,but this solved my problem.

It’s solved my problem too.
And can anyone answer for us?
Thanks :slight_smile:

Quang Hoang Minh wrote:

坤乾 朱 wrote:
> add “APP_PLATFORM := android-8” to Application.mk
>
> I don’t known why,but this solved my problem.
>
It’s solved my problem too.
And can anyone answer for us?
Thanks :slight_smile:

Lukasz Bocianski already explained it : the minimum SDK version for cocos2d-x is currently 2.2, which is API 8.

1 Like

Thanks Just add “APP_PLATFORM := android-8” to Application.mk also solve my same problem.

have no file in ${NDK_PATH}platforms\android-5\arch-arm\usr\include\GLES2before android-5,i think!

I have new problem: My example can not run on android- <= 14 (emu and real device (i just tested on real device Samsung i9100 2.3.3) and it work on emu with android-15.
> Error: Gles: No configs match configSpec.

My cocos2dx version: cocos2d-2.1rc0-x-2.1.2.

Help me! :frowning:

Thank!
It’s resolved my problem too!