Unfortunately hellocpp has stopped

Same problem here…tried bagus flyer’s suggestions, no dice.

02-25 15:24:06.440: E/AndroidRuntime(915): FATAL EXCEPTION: GLThread 96
02-25 15:24:06.440: E/AndroidRuntime(915): java.lang.IllegalArgumentException: No configs match configSpec
02-25 15:24:06.440: E/AndroidRuntime(915): at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:838)
02-25 15:24:06.440: E/AndroidRuntime(915): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:994)
02-25 15:24:06.440: E/AndroidRuntime(915): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1348)
02-25 15:24:06.440: E/AndroidRuntime(915): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1202)

Blurrrghhh. Can’t even build a blank cocos2d-x project.

Cocos2d-x Version?
WHICH device?
DID U build ndk?
COULD YOU upload the APK file?

PLZ don’t just said the logcat info, PLZ provide more details. Thanks.

coo coo wrote:

Same problem here…tried bagus flyer’s suggestions, no dice.
>
02-25 15:24:06.440: E/AndroidRuntime(915): FATAL EXCEPTION: GLThread 96
02-25 15:24:06.440: E/AndroidRuntime(915): java.lang.IllegalArgumentException: No configs match configSpec
02-25 15:24:06.440: E/AndroidRuntime(915): at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:838)
02-25 15:24:06.440: E/AndroidRuntime(915): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:994)
02-25 15:24:06.440: E/AndroidRuntime(915): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1348)
02-25 15:24:06.440: E/AndroidRuntime(915): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1202)
>
>
Blurrrghhh. Can’t even build a blank cocos2d-x project.

Sorry, I’m new to Android development.

Used the latest beta available. Using an emulated Nexus S I believe. Built NDK, not sure how to acess the apk.

But I was able to eventually get this running.

You require the emulator to use GPU processing and be version 4.2 android. Additionally the first line of bagus hack worked.

Thanks

James Chen wrote:

Cocos2d-x Version?
WHICH device?
DID U build ndk?
COULD YOU upload the APK file?
>
PLZ don’t just said the logcat info, PLZ provide more details. Thanks.
>
coo coo wrote:
> Same problem here…tried bagus flyer’s suggestions, no dice.
>
> 02-25 15:24:06.440: E/AndroidRuntime(915): FATAL EXCEPTION: GLThread 96
> 02-25 15:24:06.440: E/AndroidRuntime(915): java.lang.IllegalArgumentException: No configs match configSpec
> 02-25 15:24:06.440: E/AndroidRuntime(915): at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:838)
> 02-25 15:24:06.440: E/AndroidRuntime(915): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:994)
> 02-25 15:24:06.440: E/AndroidRuntime(915): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1348)
> 02-25 15:24:06.440: E/AndroidRuntime(915): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1202)
>
>
> Blurrrghhh. Can’t even build a blank cocos2d-x project.

Cocos2d-x Version?
http://cocos2d-x.googlecode.com/files/cocos2d-2.1beta3-x-2.1.1.zip

WHICH device?
Samsung Galaxy S2 i777 (Real Device)
Nexus 7 (Emulator)

DID U build ndk?
Yes

COULD YOU upload the APK file?
Here is the APK http://www.filedropper.com/cocos2dxtest

Bogus fix did not work for me.

I downloaded your apk package.
After i installed it on my device(Nexus S), there were no application icon on my device.
Please import the project in Eclipse, the tutorial is here(http://www.cocos2d-x.org/projects/cocos2d-x/wiki/How_to_build_and_run_HelloWorld_on_Android(gles20_branch)).

Lorenzo Nuvoletta wrote:

Cocos2d-x Version?
http://cocos2d-x.googlecode.com/files/cocos2d-2.1beta3-x-2.1.1.zip
>
WHICH device?
Samsung Galaxy S2 i777 (Real Device)
Nexus 7 (Emulator)
>
DID U build ndk?
Yes
>
COULD YOU upload the APK file?
Here is the APK http://www.filedropper.com/cocos2dxtest
>
Bogus fix did not work for me.

This is a video of me creating a project and reproducing the issue on Eclipse http://screencast.com/t/z58VqIrspB
And this is the APK resulting out of it http://www.filedropper.com/cocos2dxtest_1 (you can see the icon but it wont start)

I followed step by step the following tutorials:
http://www.cocos2d-x.org/projects/cocos2d-x/wiki/How_to_build_and_run_HelloWorld_on_Android(gles20_branch)
http://www.cocos2d-x.org/projects/cocos2d-x/wiki/How_to_build_and_run_HelloWorld_on_Android_NDK_r5_and_above
http://www.jesusbosch.com/2012/06/how-to-set-up-android-and-win32-cocos2d.html
http://www.multigesture.net/articles/how-to-setup-cocos2d-x-windows-and-android/

Plus I think I read many different stackoverflow and other forums:


http://getmoai.com/forums/word-puzzle-game-t1553/
http://www.cocos2d-x.org/boards/6/topics/17888
http://www.cocos2d-x.org/boards/6/topics/22183

Still cannot figure out what is wrong with it, and looks like I am not the only one with this problem.

I am about to give up… Has anybody successfully deployed on Android, I have been trying for weeks now…

Same problem here…i tried sample HelloCpp

Seems to be only a Windows issue, I just tried the same exact steps with my Mac and it worked just fine :confused:

I also have the same issue as of Lorenzo on Ubuntu. Any luck guys?

I got Hellocpp to work. The mistake i was doing was not building the project using NDK. After building using NDK it works fine for me on my Galaxy Nexus.

ok,this problem is your VM phone dosn;t use GPU

Hi, I’m new to android develop, and I run into this too, did your guys have an solution or workaround here? Thank you.

Hi, I’m new to android develop, and I run into this too, did your guys have an solution or workaround here? Thank you.

Is there any solution?I’m new to android too and I almost give up

I got same problem with cocos2d-x 2.1.4 and project build target Android 4.2.2 API level 17 with use host GPU see below images

This is a LogCat.
10-25 17:47:49.421: E/AndroidRuntime(329): FATAL EXCEPTION: main 10-25 17:47:49.421: E/AndroidRuntime(329): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{org.cocos2dx.hellocpp/org.cocos2dx.hellocpp.HelloCpp}: java.lang.ClassNotFoundException: org.cocos2dx.hellocpp.HelloCpp in loader dalvik.system.PathClassLoader[/data/app/org.cocos2dx.hellocpp-1.apk] 10-25 17:47:49.421: E/AndroidRuntime(329): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569) 10-25 17:47:49.421: E/AndroidRuntime(329): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663) 10-25 17:47:49.421: E/AndroidRuntime(329): at android.app.ActivityThread.access$1500(ActivityThread.java:117) 10-25 17:47:49.421: E/AndroidRuntime(329): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931) 10-25 17:47:49.421: E/AndroidRuntime(329): at android.os.Handler.dispatchMessage(Handler.java:99) 10-25 17:47:49.421: E/AndroidRuntime(329): at android.os.Looper.loop(Looper.java:123) 10-25 17:47:49.421: E/AndroidRuntime(329): at android.app.ActivityThread.main(ActivityThread.java:3683) 10-25 17:47:49.421: E/AndroidRuntime(329): at java.lang.reflect.Method.invokeNative(Native Method) 10-25 17:47:49.421: E/AndroidRuntime(329): at java.lang.reflect.Method.invoke(Method.java:507) 10-25 17:47:49.421: E/AndroidRuntime(329): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 10-25 17:47:49.421: E/AndroidRuntime(329): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 10-25 17:47:49.421: E/AndroidRuntime(329): at dalvik.system.NativeStart.main(Native Method) 10-25 17:47:49.421: E/AndroidRuntime(329): Caused by: java.lang.ClassNotFoundException: org.cocos2dx.hellocpp.HelloCpp in loader dalvik.system.PathClassLoader[/data/app/org.cocos2dx.hellocpp-1.apk] 10-25 17:47:49.421: E/AndroidRuntime(329): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240) 10-25 17:47:49.421: E/AndroidRuntime(329): at java.lang.ClassLoader.loadClass(ClassLoader.java:551) 10-25 17:47:49.421: E/AndroidRuntime(329): at java.lang.ClassLoader.loadClass(ClassLoader.java:511) 10-25 17:47:49.421: E/AndroidRuntime(329): at android.app.Instrumentation.newActivity(Instrumentation.java:1021) 10-25 17:47:49.421: E/AndroidRuntime(329): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561) 10-25 17:47:49.421: E/AndroidRuntime(329): ... 11 more

http://kongarn.com/images/Eclipse_config/log.txt

When I installed HelloCpp.apk on nexus4 android 4.3 latest version but I got error “Unfortunately, HelloCpp has stopped”
How can I fix it?

For those that wind up here in the future, one potential problem could be your emulator. Play around with it. Screen size shouldn’t matter, but the emulated CPU just might. I was trying mine on an Intel Atom (x86) Android v4.3 emulator. It would fail with the above error EVERY TIME. I created another emulator, this time as ARM (armabi-v7a) Android v4.3 and like magic, there it was, working. If it works for you, before you cheer with your head all sideways, just hit ctrl+F11. Good luck, all!

Carrie,
There is an wiki page explaining how to add support for x86 in your Cocos2d-x Apps, it is very easy:
[[http://www.cocos2d-x.org/wiki/Build_HelloWorld_on_android_x86_platform]]

summarizing the page:

  1. Support x86 and armxxx
    Change the APP_ABI in HelloWorld/android/jni/Application.mk

@ APP_ABI := armeabi armeabi-v7a x86 @

I have the same problem on emulator and on device too. I use cocos2d-x 3.0 alpha1. I have also changed to version 2.2.1 and here is the Log in Eclipse:

11-23 12:49:09.990: D/dalvikvm(921): Trying to load lib /data/app-lib/org.cocos2dx.hellocpp-1/libhellocpp.so 0xb3d0dd40
11-23 12:49:10.060: D/dalvikvm(921): Added shared lib /data/app-lib/org.cocos2dx.hellocpp-1/libhellocpp.so 0xb3d0dd40
11-23 12:49:11.010: D/Cocos2dxActivity(921): model=sdk
11-23 12:49:11.010: D/Cocos2dxActivity(921): product=sdk
11-23 12:49:11.020: D/Cocos2dxActivity(921): isEmulator=true
11-23 12:49:12.820: I/Choreographer(921): Skipped 62 frames! The application may be doing too much work on its main thread.
11-23 12:49:15.110: I/Choreographer(921): Skipped 502 frames! The application may be doing too much work on its main thread.
11-23 12:49:15.160: W/dalvikvm(921): threadid=12: thread exiting with uncaught exception (group=0xb3a4ab90)
11-23 12:49:15.270: E/AndroidRuntime(921): FATAL EXCEPTION: GLThread 79
11-23 12:49:15.270: E/AndroidRuntime(921): Process: org.cocos2dx.hellocpp, PID: 921
11-23 12:49:15.270: E/AndroidRuntime(921): java.lang.IllegalArgumentException: No configs match configSpec
11-23 12:49:15.270: E/AndroidRuntime(921): at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:863)
11-23 12:49:15.270: E/AndroidRuntime(921): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1024)
11-23 12:49:15.270: E/AndroidRuntime(921): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1401)
11-23 12:49:15.270: E/AndroidRuntime(921): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
11-23 12:49:15.390: D/gralloc_goldfish(921): Emulator without GPU emulation detected.
11-23 12:49:15.870: I/Choreographer(921): Skipped 74 frames! The application may be doing too much work on its main thread.
11-23 12:49:25.120: I/Process(921): Sending signal. PID: 921 SIG: 9
11-23 12:49:25.130: W/IInputConnectionWrapper(921): showStatusIcon on inactive InputConnection

Please help.

Hi Guys,

i am also facing the same problem.please help me to resolve in this.Please find the logs below.

01-28 15:18:03.615: E/AndroidRuntime(7421): FATAL EXCEPTION: main
01-28 15:18:03.615: E/AndroidRuntime(7421): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.cocos2dx.hellocpp/org.cocos2dx.hellocpp.Cocos2dxActivity}: java.lang.IllegalArgumentException: Unable to find native library: hellocpp
01-28 15:18:03.615: E/AndroidRuntime(7421): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2062)
01-28 15:18:03.615: E/AndroidRuntime(7421): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2087)
01-28 15:18:03.615: E/AndroidRuntime(7421): at android.app.ActivityThread.access$600(ActivityThread.java:133)
01-28 15:18:03.615: E/AndroidRuntime(7421): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1198)
01-28 15:18:03.615: E/AndroidRuntime(7421): at android.os.Handler.dispatchMessage(Handler.java:99)
01-28 15:18:03.615: E/AndroidRuntime(7421): at android.os.Looper.loop(Looper.java:137)
01-28 15:18:03.615: E/AndroidRuntime(7421): at android.app.ActivityThread.main(ActivityThread.java:4803)
01-28 15:18:03.615: E/AndroidRuntime(7421): at java.lang.reflect.Method.invokeNative(Native Method)
01-28 15:18:03.615: E/AndroidRuntime(7421): at java.lang.reflect.Method.invoke(Method.java:511)
01-28 15:18:03.615: E/AndroidRuntime(7421): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
01-28 15:18:03.615: E/AndroidRuntime(7421): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
01-28 15:18:03.615: E/AndroidRuntime(7421): at dalvik.system.NativeStart.main(Native Method)
01-28 15:18:03.615: E/AndroidRuntime(7421): Caused by: java.lang.IllegalArgumentException: Unable to find native library: hellocpp
01-28 15:18:03.615: E/AndroidRuntime(7421): at android.app.NativeActivity.onCreate(NativeActivity.java:181)
01-28 15:18:03.615: E/AndroidRuntime(7421): at org.cocos2dx.hellocpp.Cocos2dxActivity.onCreate(Cocos2dxActivity.java:11)
01-28 15:18:03.615: E/AndroidRuntime(7421): at android.app.Activity.performCreate(Activity.java:5008)
01-28 15:18:03.615: E/AndroidRuntime(7421): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
01-28 15:18:03.615: E/AndroidRuntime(7421): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2026)
01-28 15:18:03.615: E/AndroidRuntime(7421): … 11 more