I follow these steps to create an android project
- modify create-android-project.bat,
set CYGBIN=D:setANDROIDTOOLS=D:~~sdk-windows\tools
set _NDKROOT=D:~~ndk-r8
- Run create-android-project.bat
package path : com.test.helloworld
project name : helloworld
arget ID : 5 (android-10)
-
copy
D:2d-2.0-x-2.0.4\cocos2dx\platform\android\java\src
to
D:2d-2.0-x-2.0.4\helloworld\proj.android\src -
Modify D:2d-2.0-x-2.0.4\helloworld\proj.android\build_native.sh , add
NDK_ROOT=“/cygdrive/d/android-ndk-r8”
- run cgywin , and run build_native.sh
cd /cygdrive/d/cocos2d-2.0-x-2.0.4/helloworld/proj.android/
./build_native.sh
- import project helloworld to Eclipse
- run as android application, the error comes in.
11-25 04:37:11.906: D/dalvikvm(3844): Trying to load lib /data/data/com.test.helloworld/lib/libgame.so 0x405141a0
11-25 04:37:12.046: D/dalvikvm(3844): Added shared lib /data/data/com.test.helloworld/lib/libgame.so 0x405141a0
11-25 04:37:12.356: D/libEGL(3844): egl.cfg not found, using default config
11-25 04:37:12.356: D/libEGL(3844): loaded /system/lib/egl/libGLES_android.so
11-25 04:37:12.386: W/dalvikvm(3844): threadid=9: thread exiting with uncaught exception (group=0x40015560)
11-25 04:37:12.406: E/AndroidRuntime(3844): FATAL EXCEPTION: GLThread 10
11-25 04:37:12.406: E/AndroidRuntime(3844): java.lang.IllegalArgumentException: No configs match configSpec
11-25 04:37:12.406: E/AndroidRuntime(3844): at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:763)
11-25 04:37:12.406: E/AndroidRuntime(3844): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:919)
11-25 04:37:12.406: E/AndroidRuntime(3844): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1264)
11-25 04:37:12.406: E/AndroidRuntime(3844): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)
11-25 04:37:34.856: I/Process(3844): Sending signal. PID: 3844 SIG: 9
snap1.jpeg (184.9 KB)