First off all, i’m on OSX 10.7.3 using MonoDevelop 2.8.8.4 with MonoDroid 4.0.6 and Mono 2.10.9.
So I have purchased MFA and have created the generic “Mono for Android Application” project for testing.
I have checked the ABIs to “armeabi”, “armeabi-v7a” and “x86” in the Advanced tab under Option/Build/MonoForAndroidBuild.
I have also set the build to release.
I then go to Project/CreateAndroidProject in the fileMenu to build my apk file I will use to upload to the Logitech Revue GoogleTV device or x86 Emulator.
After uploading and running the application I get the error::
“The Application AndroidTest(process AndroidTest.AndroidTest) has stopped unexpectedly. Please try again.”.
I also get this same error when using the Android Emulator “API lvl 10 Intel Atom x86”.
Has anyone got MonoDroid to work on any x86 platforms? If so, which one and what were the setting you used? Were you using VirtualBox or the standard AndroidEmulator? Also what API level did you use and what were the MonoDroid proj/sln setting you needed to set to get it to work?
NOTE: The proj I used works on my ARM android phone device and the ARM AndroidEmulator.
I have also set the AndroidManifest.xml flag::
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
When I use “adb logcat” it gives the error on x86 emulators:: “java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1311]: 799 cannot locate ‘atexit’…”
EDIT – Here is the logcat information when running the application on a Logitech GoogleTV::
“
I/ActivityManager( 193): Starting: Intent {
act=android.intent.action.MAIN flg=0x10200000
cmp=com.Reign.WaterDemo_Android/waterdemo_android.Activity1 } from pid
247 I/ActivityManager( 193): Start proc com.Reign.WaterDemo_Android
for activity com.Reign.WaterDemo_Android/waterdemo_android.Activity1:
pid=2084 uid=10060 gids={1015} I/ActivityThread( 2084): Pub
com.Reign.WaterDemo_Android.mono_init: mono.MonoRuntimeProvider
D/AndroidRuntime( 2084): Shutting down VM W/dalvikvm( 2084):
threadid=1: thread exiting with uncaught exception (group=0x66995778)
E/AndroidRuntime( 2084): FATAL EXCEPTION: main E/AndroidRuntime(
2084): java.lang.UnsatisfiedLinkError: Couldn’t load monodroid:
findLibrary returned null E/AndroidRuntime( 2084): at
java.lang.Runtime.loadLibrary(Runtime.java:425) E/AndroidRuntime(
2084): at java.lang.System.loadLibrary(System.java:554)
E/AndroidRuntime( 2084): at
mono.MonoPackageManager.LoadApplication(MonoPackageManager.java:24)
E/AndroidRuntime( 2084): at
mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:22)
E/AndroidRuntime( 2084): at
android.app.ActivityThread.installProvider(ActivityThread.java:3938)
E/AndroidRuntime( 2084): at
android.app.ActivityThread.installContentProviders(ActivityThread.java:3693)
E/AndroidRuntime( 2084): at
android.app.ActivityThread.handleBindApplication(ActivityThread.java:3649)
E/AndroidRuntime( 2084): at
android.app.ActivityThread.access$2200(ActivityThread.java:124)
E/AndroidRuntime( 2084): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1054)
E/AndroidRuntime( 2084): at
android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(
2084): at android.os.Looper.loop(Looper.java:132) E/AndroidRuntime(
2084): at android.app.ActivityThread.main(ActivityThread.java:4083)
E/AndroidRuntime( 2084): at
java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime(
2084): at java.lang.reflect.Method.invoke(Method.java:491)
E/AndroidRuntime( 2084): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
E/AndroidRuntime( 2084): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
E/AndroidRuntime( 2084): at dalvik.system.NativeStart.main(Native
Method) W/ActivityManager( 193): Force finishing activity
com.Reign.WaterDemo_Android/waterdemo_android.Activity1 D/dalvikvm(
193): GC_FOR_ALLOC freed 324K, 18% free 9559K/11591K, paused 59ms
I/dalvikvm-heap( 193): Grow heap (frag case) to 9.816MB for
178700-byte allocation D/dalvikvm( 193): GC_FOR_ALLOC freed 9K, 18%
free 9723K/11783K, paused 59ms D/dalvikvm( 193): GC_FOR_ALLOC freed
117K, 19% free 9606K/11783K, paused 58ms I/dalvikvm-heap( 193): Grow
heap (frag case) to 10.794MB for 1155900-byte allocation D/dalvikvm(
193): GC_FOR_ALLOC freed 2K, 18% free 10733K/12935K, paused 56ms
D/dalvikvm( 193): GC_FOR_ALLOC freed <1K, 18% free 10733K/12935K,
paused 57ms I/dalvikvm-heap( 193): Grow heap (frag case) to 12.752MB
for 2054924-byte allocation D/dalvikvm( 193): GC_FOR_ALLOC freed 0K,
15% free 12740K/14983K, paused 57ms W/ActivityManager( 193): Activity
pause timeout for ActivityRecord{66e1c680
com.Reign.WaterDemo_Android/waterdemo_android.Activity1} D/dalvikvm(
193): GC_CONCURRENT freed 12K, 15% free 12867K/14983K, paused 1ms+3ms
“
Google TV does not support NDK, so the MonoDroid Java framework cannot load the libmonodroid.so library. There are no ABIs that will work at this time.
There is a feature request open for NDK support on Google TV:
http://code.google.com/p/googletv-issues/issues/detail?id=12