When I try running the default "Mono for Android Application", I get an error that the application has stopped unexpectedly.
After, (sometimes) I would get an exception in MonoDevelop: System.IO.IOException: DWP Handshake failed.
I'm not sure what could be wrong - I haven't made any changes to the application. Any help would be greatly appreciated - I've been trying to get this running all day.
TIA
Stacktrace:
D/AndroidRuntime( 2066): Shutting down VM
E/AndroidRuntime( 2066): FATAL EXCEPTION: main
E/AndroidRuntime( 2066): java.lang.UnsatisfiedLinkError: Couldn't load monodroid: findLibrary returned null
E/AndroidRuntime( 2066): at java.lang.Runtime.loadLibrary(Runtime.java:429)
E/AndroidRuntime( 2066): at java.lang.System.loadLibrary(System.java:554)
E/AndroidRuntime( 2066): at mono.MonoPackageManager.LoadApplication(MonoPackageManager.java:24)
E/AndroidRuntime( 2066): at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:25)
E/AndroidRuntime( 2066): at android.app.ActivityThread.installProvider(ActivityThread.java:3554)
E/AndroidRuntime( 2066): at android.app.ActivityThread.installContentProviders(ActivityThread.java:3309)
E/AndroidRuntime( 2066): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3265)
E/AndroidRuntime( 2066): at android.app.ActivityThread.access$2200(ActivityThread.java:117)
E/AndroidRuntime( 2066): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:969)
E/AndroidRuntime( 2066): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 2066): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 2066): at android.app.ActivityThread.main(ActivityThread.java:3683)
E/AndroidRuntime( 2066): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 2066): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 2066): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime( 2066): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime( 2066): at dalvik.system.NativeStart.main(Native Method)
I/Process ( 2066): Sending signal. PID: 2066 SIG: 9
I had a similar problem not long after going with the paid version. Simply clean and rebuild to update the references to the new monodroid library.
See also: http://www.mail-archive.com/monodroid#lists.ximian.com/msg00531.html
This is very probably Android bug 21670: sometimes native libraries are not extracted from the .apk, but the installation is still reported as successful:
W/NativeHelper( 98): Failed to cache package shared libs
W/NativeHelper( 98): java.io.IOException: Couldn't create cached binary /data/data/Mono.Android.DebugRuntime/lib/libmonosgen-2.0.so in /data/data/Mono.Android.DebugRuntime/lib
W/NativeHelper( 98): at com.android.internal.content.NativeLibraryHelper.copyNativeBinaryLI(NativeLibraryHelper.java:289)
Check your Android Debug Logs for a message similar to the above to confirm that this is the case.
If you see the above, you need to uninstall your app and as many other packages as possible to free up storage space, then reinstall your app.
Related
I'm trying to run hello world app using Rho Studio (just New -> Project -> Finish) on various supported platforms. I managed to run it on win32. I'm curious about windows mobile deployment, but I'm holding out now, since it requires paid subscription. The app also runs on all platforms on simulator, however I failed to run it on android using either run configuration -> Android -> Device) and RhoMobile -> Production Build -> Android, Local.
I've installed Android SDK, and NDK. I run keytool.exe manually since cert generation requires keyboard input and it blocked rake script. Generally builds are ok, and I have RhoMobileApplication1-debug.apk or RhoMobileApplication1-signed.apk.
Then I deploy it to the device
adb install *.apk
And when I run the app it almost immediately crashes with standard android messagebox when something goes really wrong. So i did adb logcat to file and figure out that possibly cause is that when loading librhodes.so it tries to load soinfo_relocate and fail.
However at this point my superpowers failed me, because google gives me only clue that it might be something with the Android NDK itself.
Any suggestions?
D/AbsListView(29935): unregisterIRListener() is called
E/dalvikvm( 6074): dlopen("/data/app-lib/com.rhomobile.rhomobileapplication1-1/librhodes.so") failed: Cannot load library: soinfo_relocate(linker.cpp:976): cannot locate symbol "sigemptyset" referenced by "librhodes.so"...
W/dalvikvm( 6074): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/rhomobile/rhodes/RhodesApplication;
W/dalvikvm( 6074): Class init failed in newInstance call (Lcom/rhomobile/rhodes/RhodesApplication;)
D/AndroidRuntime( 6074): Shutting down VM
W/dalvikvm( 6074): threadid=1: thread exiting with uncaught exception (group=0x42040930)
E/AndroidRuntime( 6074): FATAL EXCEPTION: main
E/AndroidRuntime( 6074): java.lang.ExceptionInInitializerError
E/AndroidRuntime( 6074): at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime( 6074): at java.lang.Class.newInstance(Class.java:1319)
E/AndroidRuntime( 6074): at android.app.Instrumentation.newApplication(Instrumentation.java:1000)
E/AndroidRuntime( 6074): at android.app.Instrumentation.newApplication(Instrumentation.java:985)
E/AndroidRuntime( 6074): at android.app.LoadedApk.makeApplication(LoadedApk.java:499)
E/AndroidRuntime( 6074): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4565)
E/AndroidRuntime( 6074): at android.app.ActivityThread.access$1400(ActivityThread.java:157)
E/AndroidRuntime( 6074): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1349)
E/AndroidRuntime( 6074): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 6074): at android.os.Looper.loop(Looper.java:176)
E/AndroidRuntime( 6074): at android.app.ActivityThread.main(ActivityThread.java:5319)
E/AndroidRuntime( 6074): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 6074): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 6074): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
E/AndroidRuntime( 6074): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
E/AndroidRuntime( 6074): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 6074): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_relocate(linker.cpp:976): cannot locate symbol "sigemptyset" referenced by "librhodes.so"...
E/AndroidRuntime( 6074): at java.lang.Runtime.loadLibrary(Runtime.java:371)
E/AndroidRuntime( 6074): at java.lang.System.loadLibrary(System.java:535)
E/AndroidRuntime( 6074): at com.rhomobile.rhodes.NativeLibraries.load(NativeLibraries.java:5)
E/AndroidRuntime( 6074): at com.rhomobile.rhodes.RhodesApplication.(RhodesApplication.java:105)
E/AndroidRuntime( 6074): ... 16 more
D/SensorService( 1959): -0.1 0.7 10.0
D/CrashAnrDetector( 1959): processName: com.rhomobile.rhomobileapplication1
D/CrashAnrDetector( 1959): broadcastEvent : com.rhomobile.rhomobileapplication1 data_app_crash
RhoMobileSuite5.2.2
jre1.8.0_51
android-ndk-r10e
phone with android 4.2.2
tablet with android 4.4.2
RhoMobile doesn't support at this moment NDK r10, you need to use NDK r9, as documented on RhoMobile documentation website.
On RhoMobile developer forums there're some discussion about other issues linked to people using NDK r10:
Rhostudio 5.1.1 not work in kitkat and lower versions
Android NDK r10d, Lollipop, 64-bit
I'm trying to set up an Android Virtual Device (AVD) on my Debian Wheezy machine. I run this command, and the AVD Manager opened like it should:
/.../android-sdk/tools/android avd
Then, I tried to add an AVD for an existing device, but it just didn't start up, without any error message. So I created my own device and an AVD for it, and it starts up, but just shows the Android splash screen without any changes for hours. I read through the LogCat (adb logcat) and found this error message being repeated about every minute:
E/AndroidRuntime( 1672): *** FATAL EXCEPTION IN SYSTEM PROCESS: WindowManager
E/AndroidRuntime( 1672): java.lang.NullPointerException
E/AndroidRuntime( 1672): at com.android.server.display.LocalDisplayAdapter$LocalDisplayDevice.getDisplayDeviceInfoLocked(LocalDisplayAdapter.java:147)
E/AndroidRuntime( 1672): at com.android.server.display.DisplayManagerService.handleDisplayDeviceAddedLocked(DisplayManagerService.java:852)
E/AndroidRuntime( 1672): at com.android.server.display.DisplayManagerService.handleDisplayDeviceAdded(DisplayManagerService.java:841)
E/AndroidRuntime( 1672): at com.android.server.display.DisplayManagerService.access$1100(DisplayManagerService.java:96)
E/AndroidRuntime( 1672): at com.android.server.display.DisplayManagerService$DisplayAdapterListener.onDisplayDeviceEvent(DisplayManagerService.java:1281)
E/AndroidRuntime( 1672): at com.android.server.display.DisplayAdapter$1.run(DisplayAdapter.java:108)
E/AndroidRuntime( 1672): at android.os.Handler.handleCallback(Handler.java:733)
E/AndroidRuntime( 1672): at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime( 1672): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 1672): at android.os.HandlerThread.run(HandlerThread.java:61)
E/AndroidRuntime( 1672): Error reporting crash
E/AndroidRuntime( 1672): java.lang.NullPointerException
E/AndroidRuntime( 1672): at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:84)
E/AndroidRuntime( 1672): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
E/AndroidRuntime( 1672): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
I also tried to delete the $HOME/.android/avd folder and recreating the AVD, but it didn't help.
How can I fix this error? Note that I only have installed the SDK, not Eclipse.
Yes, I know this question is similar to this, but it never got answered and I don't like resurrecting old threads (from July '13).
I just began testing my game on a real device (yay!), and though it works perfectly on the Corona Simulator, every time I open it on the actual device and now the emulator, I get "Sorry! The application SampleApp (process com.foo.bar.SampleApp) has stopped unexpectedly. Please try again." I opened adb logcat and find that I'm getting this error:
I/ActivityThread( 1264): Pub com.foo.bar.SampleApp.files: com.ansca.corona.storage.FileContentProvider
W/dalvikvm( 1264): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/ansca/corona/JavaToNativeShim;
W/dalvikvm( 1264): Exception Ljava/lang/ExceptionInInitializerError; thrown while initializing Lcom/ansca/corona/CoronaEnvironment;
D/AndroidRuntime( 1264): Shutting down VM
W/dalvikvm( 1264): threadid=1: thread exiting with uncaught exception (group=0x40020560)
E/AndroidRuntime( 1264): FATAL EXCEPTION: main
E/AndroidRuntime( 1264): java.lang.ExceptionInInitializerError
E/AndroidRuntime( 1264): at com.ansca.corona.CoronaView.deleteTempDirectory(CoronaView.java:141)
E/AndroidRuntime( 1264): at com.ansca.corona.CoronaActivity.onCreate(CoronaActivity.java:101)
E/AndroidRuntime( 1264): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime( 1264): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1618)
E/AndroidRuntime( 1264): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1670)
E/AndroidRuntime( 1264): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
E/AndroidRuntime( 1264): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
E/AndroidRuntime( 1264): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1264): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 1264): at android.app.ActivityThread.main(ActivityThread.java:3695)
E/AndroidRuntime( 1264): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1264): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 1264): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
E/AndroidRuntime( 1264): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
E/AndroidRuntime( 1264): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 1264): Caused by: java.lang.ExceptionInInitializerError
E/AndroidRuntime( 1264): at com.ansca.corona.CoronaEnvironment.setLuaErrorHandler(CoronaEnvironment.java:379)
E/AndroidRuntime( 1264): at com.ansca.corona.CoronaEnvironment.<clinit>(CoronaEnvironment.java:41)
E/AndroidRuntime( 1264): ... 15 more
E/AndroidRuntime( 1264): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load lua: findLibrary returned null
E/AndroidRuntime( 1264): at java.lang.Runtime.loadLibrary(Runtime.java:429)
E/AndroidRuntime( 1264): at java.lang.System.loadLibrary(System.java:554)
E/AndroidRuntime( 1264): at com.ansca.corona.JavaToNativeShim.<clinit>(JavaToNativeShim.java:118)
E/AndroidRuntime( 1264): ... 17 more
W/ActivityManager( 146): Force finishing activity com.foo.bar.SampleApp/com.ansca.corona.CoronaActivity
Of course, the real process name isn't com.foo.bar.SampleApp, but it's the same thing.
I have an old Android, so that may be the issue, but I sure hope not. I'm on a Huawei-U8652, Android version 2.3.5. I also built a Corona sample code app, and it did the same thing with the same error.
The error is that Lua can't be found, that's pretty extreme. Works from Corona Sim, but not on real device, or in Eclipse-based emulator. Until you can get it to work on the real device, there is no point in using the emulator, it's just too much of an unknown wrt Corona. Try this:
verify examples that come with Corona work on your device
if they do, start adding parts of your main.lua in one of those examples; maybe at some point the error will happen again, allowing you to identify a specific lib call that corrupts memory and sends everything wally
start adding other parts of your app (if you import modules during startup), until you see the error again
I am trying to use the Google Drive SDK to upload files, but I am getting a pop up saying unfortunately your application has stopped. This is due to a NoClassDefFoundError. I also made sure to include the play services jar and check it in the order and export tab as well.
This is the excpetion:
E/AndroidRuntime( 4906): java.lang.NoClassDefFoundError: com.google.android.gms.common.AccountPicker
E/AndroidRuntime( 4906): at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential.
newChooseAccountIntent(GoogleAccountCredential.java:253)
E/AndroidRuntime( 4906): at com.example.informationretreival.MainActivity.onCreate(MainActivity.java:42)
E/AndroidRuntime( 4906): at android.app.Activity.performCreate(Activity.java:5104)
E/AndroidRuntime( 4906): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
E/AndroidRuntime( 4906): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2147)
E/AndroidRuntime( 4906): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
E/AndroidRuntime( 4906): at android.app.ActivityThread.access$600(ActivityThread.java:144)
E/AndroidRuntime( 4906): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
E/AndroidRuntime( 4906): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 4906): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 4906): at android.app.ActivityThread.main(ActivityThread.java:5074)
E/AndroidRuntime( 4906): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 4906): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 4906): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
E/AndroidRuntime( 4906): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
E/AndroidRuntime( 4906): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 771): Force finishing activity com.example.informationretreival/.MainActivity
I am following the quickstart on the developer website I have literally just copied the code. I would expect the quickstart example to work. Someone please point me in the right direction.
In your Android application configuration page, select Google APIs (Google Inc.) (API 17) for Compile with. Also, it would work more stable on real phone than virtual device since virtual device doesn't have play store.
My appwidget crashes with following error:
E/AndroidRuntime( 5572): FATAL EXCEPTION: main
E/AndroidRuntime( 5572): java.lang.RuntimeException: Unable to start receiver com.android.mlweatherwidget.WeatherWidgetLarge: java.lang.RuntimeException: system server dead?
E/AndroidRuntime( 5572): at android.app.ActivityThread.handleReceiver(ActivityThread.java:1805)
E/AndroidRuntime( 5572): at android.app.ActivityThread.access$2400(ActivityThread.java:117)
E/AndroidRuntime( 5572): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:981)
E/AndroidRuntime( 5572): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 5572): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 5572): at android.app.ActivityThread.main(ActivityThread.java:3683)
E/AndroidRuntime( 5572): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 5572): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 5572): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime( 5572): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime( 5572): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 5572): Caused by: java.lang.RuntimeException: system server dead?
E/AndroidRuntime( 5572): at com.android.mlhome.appwidget.AppWidgetManager.getAppWidgetIds(AppWidgetManager.java:375)
E/AndroidRuntime( 5572): at com.android.mlweatherwidget.WeatherWidgetLarge.onReceive(WeatherWidgetLarge.java:202)
E/AndroidRuntime( 5572): at android.app.ActivityThread.handleReceiver(ActivityThread.java:1794)
E/AndroidRuntime( 5572): ... 10 more
E/AndroidRuntime( 5572): Caused by: android.os.DeadObjectException
E/AndroidRuntime( 5572): at android.os.BinderProxy.transact(Native Method)
E/AndroidRuntime( 5572): at com.android.mlhome.appwidget.ILauncherAppWidget$Stub$Proxy.getAppWidgetIds(ILauncherAppWidget.java:256)
E/AndroidRuntime( 5572): at com.android.mlhome.appwidget.AppWidgetManager.getAppWidgetIds(AppWidgetManager.java:369)
E/AndroidRuntime( 5572): ... 12 more
Can anybody understand from the above log what exactly is causing this error?
How to fix android.os.DeadObjectException android X
this guy met the same issue, check this link out.
I copyed the answer written by Dimitar Dimitrov as follows
This means that your service had already stopped - either killed from
the OS, or stopped from your application.
Does this problem happen every time you debug your project?
Override your service's onDestroy() method and watch what event flow
leads to it. If you catch DeadObjectException without going through
this method, your service should have been killed by the OS.