My MG Android project got built and deployed to a Nexus S emulator, but always fails with some errors. I am including the exception log and application output here, and am wondering if someone could help me figure out what the problem is…
=Below is the exception log:=
Java.Lang.RuntimeException: java.lang.reflect.InvocationTargetException
at — End of managed exception stack trace —
at java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at at dalvik.system.NativeStart.main(Native Method)
at Caused by: java.lang.reflect.InvocationTargetException
at at java.lang.reflect.Method.invokeNative(Native Method)
at at java.lang.reflect.Method.invoke(Method.java:511)
at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at … 2 more
at Caused by: md52ce486a14f4bcd95899665e9d932190b.JavaProxyThrowable: Microsoft.Xna.Framework.Graphics.NoSuitableGraphicsDeviceException: Failed to find a valid GraphicsMode configuration —> OpenTK.Platform.Android.EglException: Failed to find a valid GraphicsMode configuration
at OpenTK.Platform.Android.AndroidGraphicsMode.ChooseConfig (Javax.Microedition.Khronos.Egl.EGLDisplay display) [0x0036e] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/opentk/Source/OpenTK/Platform/Android/AndroidGraphicsMode.cs:192
at OpenTK.Platform.Android.AndroidGraphicsMode.Initialize (Javax.Microedition.Khronos.Egl.EGLDisplay display, Int32 version) [0x0000a] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/opentk/Source/OpenTK/Platform/Android/AndroidGraphicsMode.cs:233
at OpenTK.Platform.Android.AndroidGraphicsContext.Init (OpenTK.Graphics.GraphicsMode mode, IWindowInfo win, IGraphicsContext sharedContext, Int32 major, Int32 minor, GraphicsContextFlags flags) [0x000c5] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/opentk/Source/OpenTK/Platform/Android/AndroidGraphicsContext.cs:133
at OpenTK.Platform.Android.AndroidGraphicsContext…ctor (OpenTK.Graphics.GraphicsMode mode, IWindowInfo window, IGraphicsContext sharedContext, GLVersion glesVersion, GraphicsContextFlags flags) [0x00028] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/opentk/Source/OpenTK/Platform/Android/AndroidGraphicsContext.cs:104
at OpenTK.Platform.Android.AndroidGraphicsContext.CreateGraphicsContext (OpenTK.Graphics.GraphicsMode mode, IWindowInfo window, IGraphicsContext sharedContext, GLVersion glVersion, GraphicsContextFlags flags) [0x00007] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/opentk/Source/OpenTK/Platform/Android/AndroidGraphicsContext.cs:59
at OpenTK.Platform.Android.AndroidGameView.CreateContext () [0x00041] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/opentk/Source/OpenTK/Platform/Android/AndroidGameView.cs:403
at OpenTK.Platform.Android.AndroidGameView.MakeCurrent () [0x00013] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/opentk/Source/OpenTK/Platform/Android/AndroidGameView.cs:209
at Microsoft.Xna.Framework.MonoGameAndroidGameView.OnLoad (System.EventArgs eventArgs) [0x0000a] in i:\MonoGame\MonoGame.Framework\Android\MonoGameAndroidGameView.cs:143
at — End of inner exception stack trace —
at Microsoft.Xna.Framework.MonoGameAndroidGameView.OnLoad (System.EventArgs) [0x00016] in i:\MonoGame\MonoGame.Framework\Android\MonoGameAndroidGameView.cs:147
at OpenTK.Platform.Android.AndroidGameView.LoadInternal (System.EventArgs) [0x00003] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/opentk/Source/OpenTK/Platform/Android/AndroidGameView.cs:293
at OpenTK.Platform.Android.AndroidGameView.SurfaceCreated (Android.Views.ISurfaceHolder) [0x00059] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/opentk/Source/OpenTK/Platform/Android/AndroidGameView.cs:119
at Microsoft.Xna.Framework.MonoGameAndroidGameView.Android.Views.ISurfaceHolderCallback.SurfaceCreated (Android.Views.ISurfaceHolder) [0x00001] in i:\MonoGame\MonoGame.Framework\Android\MonoGameAndroidGameView.cs:129
at Android.Views.ISurfaceHolderCallbackInvoker.n_SurfaceCreated_Landroid_view_SurfaceHolder_ (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/monodroid/src/Mono.Android/platforms/android-15/src/generated/Android.Views.ISurfaceHolder.cs:194
at at (wrapper dynamic-method) object.65492e41-d7d9-4587-820f-5c67f2e453d3 (intptr,intptr,intptr) <IL 0x00017, 0x00053>
at at md5cedead65730cfb9c4b33fbfd5914d87f.MonoGameAndroidGameView.n_surfaceCreated(Native Method)
at at md5cedead65730cfb9c4b33fbfd5914d87f.MonoGameAndroidGameView.surfaceCreated(MonoGameAndroidGameView.java:83)
at at android.view.SurfaceView.updateWindow(SurfaceView.java:533)
at at android.view.SurfaceView.access$000(SurfaceView.java:81)
at at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:169)
at at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:590)
at at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1617)
at at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2442)
at at android.os.Handler.dispatchMessage(Handler.java:99)
at at android.os.Looper.loop(Looper.java:137)
at at android.app.ActivityThread.main(ActivityThread.java:4424)
at … 5 more
=Below is the application output:=
[Mono] DllImport attempting to load: ‘/system/lib/libc.so’.
[Mono] DllImport loaded library ‘/system/lib/libc.so’.
[Mono] DllImport searching in: ‘/system/lib/libc.so’ (’/system/lib/libc.so’).
[Mono] Searching for ‘gettid’.
[Mono] Probing ‘gettid’.
[Mono] Found as ‘gettid’.
[Mono] Assembly Ref addref MonoGame.Framework[0x2a2151e0] -> System.Core[0x2a2cc3a8]: 4
[Choreographer] Skipped 45 frames! The application may be doing too much work on its main thread.
Thread started: #4
[MonoGame] MonoGameAndroidGameView.CreateFrameBuffer
[Mono] DllImport attempting to load: ‘/system/lib/libc.so’.
[Mono] DllImport loaded library ‘/system/lib/libc.so’.
[Mono] DllImport searching in: ‘/system/lib/libc.so’ (’/system/lib/libc.so’).
[Mono] Searching for ‘uname’.
[Mono] Probing ‘uname’.
[Mono] Found as ‘uname’.
[Mono] DllImport attempting to load: ‘libEGL.dll’.
[Mono] DllImport error loading library ‘./libEGL.dll’: ‘dlopen failed: library “/data/app-lib/TheGame/./libEGL.dll” not found’.
[Mono] DllImport error loading library ‘./libEGL.dll.so’: ‘dlopen failed: library “/data/app-lib/TheGame/libaot-libEGL.dll.so” not found’.
[Mono] DllImport error loading library ‘libEGL.dll’: ‘dlopen failed: library “/data/app-lib/TheGame/libEGL.dll” not found’.
[Mono] DllImport error loading library ‘libEGL.dll.so’: ‘dlopen failed: library “/data/app-lib/TheGame/libaot-libEGL.dll.so” not found’.
[Mono] DllImport error loading library ‘libEGL.dll’: ‘dlopen failed: library “/data/app-lib/TheGame/libEGL.dll” not found’.
[Mono] DllImport error loading library ‘./libEGL’: ‘dlopen failed: library “/data/app-lib/TheGame/./libEGL” not found’.
[Mono] DllImport loaded library ‘./libEGL.so’.
[Mono] DllImport searching in: ‘libEGL.dll’ (’./libEGL.so’).
[Mono] Searching for ‘eglGetCurrentContext’.
[Mono] Probing ‘eglGetCurrentContext’.
[Mono] Found as ‘eglGetCurrentContext’.
[MonoGame] Creating Color: 32 (8888), Depth: 24, Stencil: 0, Accum:32 (8888)
[MonoGame] Creating Color: 16 (5650), Depth: 24, Stencil: 0, Accum:16 (5650)
[MonoGame] Creating Color: 0 (0000), Depth: 24, Stencil: 0, Accum:0 (0000)
[MonoGame] Creating Color: 32 (8888), Depth: 16, Stencil: 0, Accum:32 (8888)
[MonoGame] Creating Color: 16 (5650), Depth: 16, Stencil: 0, Accum:16 (5650)
[MonoGame] Creating Color: 0 (0000), Depth: 16, Stencil: 0, Accum:0 (0000)
[MonoGame] Creating default mode
[MonoGame] Creating Color: 0 (0000), Depth: 0, Stencil: 0, Accum:0 (0000)
[Mono] DllImport attempting to load: ‘/system/lib/liblog.so’.
[Mono] DllImport loaded library ‘/system/lib/liblog.so’.
[Mono] DllImport searching in: ‘/system/lib/liblog.so’ (’/system/lib/liblog.so’).
[Mono] Searching for ‘__android_log_print’.
[Mono] Probing ‘__android_log_print’.
[Mono] Found as '_android_log_print’.
[MonoDroid] UNHANDLED EXCEPTION:
[MonoDroid] Microsoft.Xna.Framework.Graphics.NoSuitableGraphicsDeviceException: Failed to find a valid GraphicsMode configuration —> OpenTK.Platform.Android.EglException: Failed to find a valid GraphicsMode configuration
[MonoDroid] at OpenTK.Platform.Android.AndroidGraphicsMode.ChooseConfig (Javax.Microedition.Khronos.Egl.EGLDisplay display) [0x0036e] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/opentk/Source/OpenTK/Platform/Android/AndroidGraphicsMode.cs:192
[MonoDroid] at OpenTK.Platform.Android.AndroidGraphicsMode.Initialize (Javax.Microedition.Khronos.Egl.EGLDisplay display, Int32 version) [0x0000a] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/opentk/Source/OpenTK/Platform/Android/AndroidGraphicsMode.cs:233
[MonoDroid] at OpenTK.Platform.Android.AndroidGraphicsContext.Init (OpenTK.Graphics.GraphicsMode mode, IWindowInfo win, IGraphicsContext sharedContext, Int32 major, Int32 minor, GraphicsContextFlags flags) [0x000c5] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/opentk/Source/OpenTK/Platform/Android/AndroidGraphicsContext.cs:133
[MonoDroid] at OpenTK.Platform.Android.AndroidGraphicsContext…ctor (OpenTK.Graphics.GraphicsMode mode, IWindowInfo window, IGraphicsContext sharedContext, GLVersion glesVersion, GraphicsContextFlags flags) [0x00028] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/opentk/Source/OpenTK/Platform/Android/AndroidGraphicsContext.cs:104
[MonoDroid] at OpenTK.Platform.Android.AndroidGraphicsContext.CreateGraphicsContext (OpenTK.Graphics.GraphicsMode mode, IWindowInfo window, IGraphicsContext sharedContext, GLVersion glVersion, GraphicsContextFlags flags) [0x00007] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/opentk/Source/OpenTK/Platform/Android/AndroidGraphicsContext.cs:59
[MonoDroid] at OpenTK.Platform.Android.AndroidGameView.CreateContext () [0x00041] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/opentk/Source/OpenTK/Platform/Android/AndroidGameView.cs:403
[MonoDroid] at OpenTK.Platform.Android.AndroidGameView.MakeCurrent () [0x00013] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/opentk/Source/OpenTK/Platform/Android/AndroidGameView.cs:209
[MonoDroid] at Microsoft.Xna.Framework.MonoGameAndroidGameView.OnLoad (System.EventArgs eventArgs) [0x0000a] in i:\MonoGame\MonoGame.Framework\Android\MonoGameAndroidGameView.cs:143
[MonoDroid] — End of inner exception stack trace —
[MonoDroid] at Microsoft.Xna.Framework.MonoGameAndroidGameView.OnLoad (System.EventArgs) [0x00016] in i:\MonoGame\MonoGame.Framework\Android\MonoGameAndroidGameView.cs:147
[MonoDroid] at OpenTK.Platform.Android.AndroidGameView.LoadInternal (System.EventArgs) [0x00003] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/opentk/Source/OpenTK/Platform/Android/AndroidGameView.cs:293
[MonoDroid] at OpenTK.Platform.Android.AndroidGameView.SurfaceCreated (Android.Views.ISurfaceHolder) [0x00059] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/opentk/Source/OpenTK/Platform/Android/AndroidGameView.cs:119
[MonoDroid] at Microsoft.Xna.Framework.MonoGameAndroidGameView.Android.Views.ISurfaceHolderCallback.SurfaceCreated (Android.Views.ISurfaceHolder) [0x00001] in i:\MonoGame\MonoGame.Framework\Android\MonoGameAndroidGameView.cs:129
[MonoDroid] at Android.Views.ISurfaceHolderCallbackInvoker.n_SurfaceCreated_Landroid_view_SurfaceHolder (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/monodroid/src/Mono.Android/platforms/android-15/src/generated/Android.Views.ISurfaceHolder.cs:194
[MonoDroid] at (wrapper dynamic-method) object.53111b0d-bb58-4ffd-ac63-2b256d6bb75d (intptr,intptr,intptr) <IL 0x00017, 0x00053>
[AndroidRuntime] Shutting down VM