11

My apps with OpenGL all don't work with "name has stopped working". This happens even with Android Sample Projects (BasicGLSurfaceView). When I load the projects into Cclipse and run them, they dont work, but if I run the emulator and select it through API Demos it works perfectly. Running newest Eclipse and API 14.0. This also happens with my apps which appear flawless

This is from BasicGLSurfaceView that was simply loaded into Eclipse and run

Logcat at crash-----------------

11-19 21:35:52.887: E/AndroidRuntime(556): FATAL EXCEPTION: GLThread 75
11-19 21:35:52.887: E/AndroidRuntime(556): java.lang.IllegalArgumentException: No configs match configSpec
11-19 21:35:52.887: E/AndroidRuntime(556):  at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:825)
11-19 21:35:52.887: E/AndroidRuntime(556):  at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:981)
11-19 21:35:52.887: E/AndroidRuntime(556):  at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1335)
11-19 21:35:52.887: E/AndroidRuntime(556):  at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1189)

Console------------------------------

[2011-11-19 21:34:40 - BasicGLSurfaceView] New emulator found: emulator-5554
[2011-11-19 21:34:40 - BasicGLSurfaceView] Waiting for HOME('android.process.acore')   to be launched...
[2011-11-19 21:35:16 - BasicGLSurfaceView] WARNING: Application does not specify an API level requirement!
[2011-11-19 21:35:16 - BasicGLSurfaceView] Device API version is 14 (Android 4.0.1)
[2011-11-19 21:35:16 - BasicGLSurfaceView] HOME is up on device 'emulator-5554'
[2011-11-19 21:35:16 - BasicGLSurfaceView] Uploading BasicGLSurfaceView.apk onto device 'emulator-5554'
[2011-11-19 21:35:16 - BasicGLSurfaceView] Installing BasicGLSurfaceView.apk...
[2011-11-19 21:35:49 - BasicGLSurfaceView] Success!
[2011-11-19 21:35:50 - BasicGLSurfaceView] Starting activity com.example.android.basicglsurfaceview.BasicGLSurfaceViewActivity on device emulator-5554
[2011-11-19 21:35:52 - BasicGLSurfaceView] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.android.basicglsurfaceview/.BasicGLSurfaceViewActivity }
Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982
user1055947
  • 862
  • 3
  • 9
  • 22
  • 1
    Do you have this line: `myGLSurfaceView.setEGLConfigChooser(true);` before `myGLSurfaceView.setRenderer(graphicsRenderer);` in your code? The emulator is not good for openGL stuff in my experience. Compared to running an openGL app on an actual device, the emulator is a lot slower, sometimes to the point of timing out and android thinking your app has crashed. Debug mode and/or on a slow computer will both slow the emulator. I seem to remember even that at one point, the emulator did not actually support openGL-es 2.0 specific stuff. Basically, try to get the app running on a device first – James Coote Nov 25 '11 at 13:20
  • learned that emulator isnt compatible with gles 2 – user1055947 Nov 26 '11 at 03:45

5 Answers5

20

One year passed, but I hope I can help other unlucky guys!

You had forgot add the GPU emulation hardware property and set its value to yes in your emulation. Add them and try it.

ForceMagic
  • 6,230
  • 12
  • 66
  • 88
user1807862
  • 201
  • 2
  • 3
2

With adt 19 and sdk 4.0.3 r3 the emulator now supports OpenGL.

http://android-developers.blogspot.com/2012/04/faster-emulator-with-better-hardware.html

Make sure when you setup the emulator in the Hardware properties you add GPU emulation and set the value to yes.

http://developer.android.com/tools/devices/emulator.html

Flynn81
  • 4,108
  • 29
  • 28
2

The problem is the same as here:

Android OpenGL ES 2.0 emulator

QUOTE:

As stated by Google itself, in the official Android documentation, the Android emulator does not support yet the OpenGL ES 2.0 features.

Please refer to this official document.

http://developer.android.com/resources/tutorials/opengl/opengl-es20.html

I hope this answers your question.

Community
  • 1
  • 1
Maurizio Benedetti
  • 3,557
  • 19
  • 26
1

The tip is: Don't use the emulator. Hook up the device that you use. There should be documentation on setting that up. After that, if the device is plugged in, it will show up when you start your app.

monster860
  • 124
  • 9
0

I was faced same problem... And finally when I Unchecked Both Options i.e. Use Host GPU as well as Store a snapshot for faster startup... That's it... It helps me... For More Details just See http://on-android-opengl2.blogspot.in/2013/05/android-opengl-es-20-emulator.html

Abhishek
  • 3,348
  • 3
  • 15
  • 34