Android模拟器OpenGL问题

时间:2016-04-23 22:05:26

标签: c# android xamarin android-emulator opengl-es-2.0

由于我构建了一台新计算机,因此在我能想到的每个模拟器上运行当前项目时遇到问题(例如Xamarin Android Player,Visual Studio Emulator,Android SDK一个......)。每次我在模拟器上运行项目(它在真实设备上都可以正常工作)时,模拟器屏幕是灰色的,只有一些由我的“引擎”呈现的文本出现。 (像这样:http://i.stack.imgur.com/7AFos.png)。为了开发我的项目,我正在使用Xamarin和OpenGL ES 2。

我查找了来自不同仿真器的所有日志,在仿真器和真实设备上进行调试时只有一些差异。

  1. 日志显示一些疯狂的错误

    • I/OpenGLRenderer( 3523): Initialized EGL, version 1.4
    • W/EGL_emulation( 3523): eglSurfaceAttrib not implemented
    • W/OpenGLRenderer( 3523): Failed to set EGL_SWAP_BEHAVIOR on surface 0x9c242f20, error=EGL_SUCCESS"
  2. 有很多garbace集合(大约每秒一个),其日志看起来像这样:

    • D/Mono ( 3523): GC_OLD_BRIDGE num-objects 1 num_hash_entries 1 sccs size 1 init 0.00ms df1 0.02ms sort 0.01ms dfs2 0.01ms setup-cb 0.01ms free-data 0.01ms links 0/0/0/0 dfs passes 0/0
    • D/Mono ( 3523): GC_MINOR: (Nursery full) pause 0.51ms, total 0.73ms, bridge 0.01ms promoted 1216K major 1216K los 331K
  3. 这是我的Android清单:

    <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.tipfom.mapknight">
    <uses-feature android:glEsVersion="0x00020000" />
    <uses-sdk android:targetSdkVersion="21" android:minSdkVersion="21" />
    <application android:label="mapKnight" android:icon="@drawable/icon" android:hardwareAccelerated="true"></application>´
    

    我已经尝试关闭主机GPU,增加应用程序的目标和minSdkVersion,下载所有AndroidSDK文件直到API 15并安装Intel HAXM驱动程序。

0 个答案:

没有答案