eclipse Android OpenGL 应用程序在模拟器中加载后停止工作

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8199067/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 17:20:46  来源:igfitidea点击:

Android OpenGL apps stop working after being loaded in emulator

androideclipseopengl-esemulationopengl-es-2.0

提问by user1055947

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

我的 OpenGL 应用程序都无法使用“名称已停止工作”。即使使用 Android 示例项目 (BasicGLSurfaceView),也会发生这种情况。当我将项目加载到 Cclipse 并运行它们时,它们不起作用,但是如果我运行模拟器并通过 API Demos 选择它,它就可以完美运行。运行最新的 Eclipse 和 API 14.0。这也发生在我看起来完美无缺的应用程序中

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

这是来自 BasicGLSurfaceView,它被简单地加载到 Eclipse 中并运行

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

崩溃时的 Logcat-----------------

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 }

回答by user1807862

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

一年过去了,但我希望我可以帮助其他不幸的人!

You had forgot add the GPU emulationhardware property and set its value to yesin your emulation. Add them and try it.

您忘记了在仿真中添加GPU emulation硬件属性并将其值设置为yes。添加它们并尝试一下。

回答by Maurizio Benedetti

The problem is the same as here:

问题和这里一样:

Android OpenGL ES 2.0 emulator

安卓 OpenGL ES 2.0 模拟器

QUOTE:

引用:

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

正如谷歌自己所说,在官方 Android 文档中,Android 模拟器尚不支持 OpenGL ES 2.0 功能。

Please refer to this official document.

请参考这个官方文档。

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

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

I hope this answers your question.

我希望这回答了你的问题。

回答by Flynn81

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

使用 adt 19 和 sdk 4.0.3 r3,模拟器现在支持 OpenGL。

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

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.

确保在硬件属性中设置模拟器时添加 GPU 模拟并将值设置为 yes。

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

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

回答by monster860

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.

提示是:不要使用模拟器。连接您使用的设备。应该有关于设置的文档。之后,如果设备已插入,它将在您启动应用程序时显示。

回答by Abhishek

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

我遇到了同样的问题......最后当我取消选中两个选项时,即使用主机GPU以及存储快照以加快启动......就是这样......它对我有帮助......有关更多详细信息,请参阅 http:/ /on-android-opengl2.blogspot.in/2013/05/android-opengl-es-20-emulator.html