java.lang.RuntimeException: system server dead? - android

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.

Related

Android javafxports NullPointerException

I'm getting a force close crash on a small Android app I made for school using Javafxports.
Here is the code and APKs
And the logcat returns this exception:
E/AndroidRuntime( 4474): FATAL EXCEPTION: JavaFX Application Thread
E/AndroidRuntime( 4474): Process: com.julioqc.superflush, PID: 4474
E/AndroidRuntime( 4474): java.lang.NullPointerException
E/AndroidRuntime( 4474): at com.sun.glass.ui.monocle.MonocleWindowManager$1.run(MonocleWindowManager.java:179)
E/AndroidRuntime( 4474): at com.sun.javafx.application.PlatformImpl.lambda$null$155(PlatformImpl.java:295)
E/AndroidRuntime( 4474): at com.sun.javafx.application.PlatformImpl$$Lambda$19.run(Unknown Source)
E/AndroidRuntime( 4474): at java.security.AccessController.doPrivileged(AccessController.java:52)
E/AndroidRuntime( 4474): at com.sun.javafx.application.PlatformImpl.lambda$runLater$156(PlatformImpl.java:294)
E/AndroidRuntime( 4474): at com.sun.javafx.application.PlatformImpl$$Lambda$6.run(Unknown Source)
E/AndroidRuntime( 4474): at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:92)
E/AndroidRuntime( 4474): at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:51)
E/AndroidRuntime( 4474): at java.lang.Thread.run(Thread.java:841)
I/cm.log.servpro( 1334): [Privacy]/ com.google.android.googlequicksearchbox is not in contact list
W/ActivityManager( 726): Force finishing activity com.julioqc.superflush/javafxports.android.FXActivity
What is causing this error in my code??
EDIT: found out the issue is caused by some unsupported JavaFX 8 dialogs. Trying alternative.

Crash at startup on port to Cordova Crosswalk (Android)

I'm porting an existing android cordova app to cordova crosswalk.
Using cordova 4, crosswalk-cordova-10.39.235.9-x86 and Android SDK 19
The app crashes at startup with the following logs in logcat:
D/AndroidRuntime( 7208): Shutting down VM
W/dalvikvm( 7208): threadid=1: thread exiting with uncaught exception (group=0x41caeda0)
E/AndroidRuntime( 7208): FATAL EXCEPTION: main
E/AndroidRuntime( 7208): Process: myapp.cqa, PID: 7208
E/AndroidRuntime( 7208): java.lang.ExceptionInInitializerError
E/AndroidRuntime( 7208): at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:295)
E/AndroidRuntime( 7208): at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:348)
E/AndroidRuntime( 7208): at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:323)
E/AndroidRuntime( 7208): at myapp.cqa.CordovaApp.onCreate(CordovaApp.java:31)
E/AndroidRuntime( 7208): at android.app.Activity.performCreate(Activity.java:5451)
E/AndroidRuntime( 7208): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
E/AndroidRuntime( 7208): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2358)
E/AndroidRuntime( 7208): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2452)
E/AndroidRuntime( 7208): at android.app.ActivityThread.access$900(ActivityThread.java:172)
E/AndroidRuntime( 7208): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1302)
E/AndroidRuntime( 7208): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 7208): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 7208): at android.app.ActivityThread.main(ActivityThread.java:5586)
E/AndroidRuntime( 7208): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 7208): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 7208): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
E/AndroidRuntime( 7208): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
E/AndroidRuntime( 7208): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 7208): Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Use SharedXWalkView if you want to support shared mode
E/AndroidRuntime( 7208): at org.xwalk.core.ReflectionHelper.handleException(ReflectionHelper.java:233)
E/AndroidRuntime( 7208): at org.xwalk.core.ReflectionHelper.handleException(ReflectionHelper.java:237)
E/AndroidRuntime( 7208): at org.xwalk.core.ReflectionHelper.init(ReflectionHelper.java:132)
E/AndroidRuntime( 7208): at org.xwalk.core.ReflectionHelper.loadClass(ReflectionHelper.java:199)
E/AndroidRuntime( 7208): at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:112)
E/AndroidRuntime( 7208): at org.apache.cordova.CordovaWebView.<clinit>(CordovaWebView.java:890)
E/AndroidRuntime( 7208): ... 18 more
E/AndroidRuntime( 7208): Caused by: java.lang.RuntimeException: Use SharedXWalkView if you want to support shared mode
E/AndroidRuntime( 7208): ... 23 more
Any idea why it crashes ?
OK, after a night of sleeping, I realized I was using x86 crosswalk instead of the ARM one. Sorry for the dumb issue post...

app still running after disable

I’ve installed an app I’ve written as a system app that after receiving ACTION_BOOT_COMPLETED it runs a service.
The app works just fine, however, I would like to disable it (and not remove it completely).
So I wrote on the command line “adb shell pm disable [The package name]” and after reboot, even though I do not see my app on the menu anymore, I still get a message “Unfortunately [myApp] has stopped”.
Logcat:
FATAL EXCEPTION: main
E/AndroidRuntime( 1356): java.lang.RuntimeException: Unable to instantiate service [package name] : java.lang.ClassNotFoundException: Didn't find class "[packagename.classThatStartsTheService]" on path: /system/app/app.apk
E/AndroidRuntime( 1356): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2516)
E/AndroidRuntime( 1356): at android.app.ActivityThread.access$1600(ActivityThread.java:144)
E/AndroidRuntime( 1356): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1319)
E/AndroidRuntime( 1356): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1356): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1356): at android.app.ActivityThread.main(ActivityThread.java:5074)
E/AndroidRuntime( 1356): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1356): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 1356): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
E/AndroidRuntime( 1356): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
E/AndroidRuntime( 1356): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 1356): Caused by: java.lang.ClassNotFoundException: Didn't find class "[packagename.class that starts the service]" on path: /system/app/app.apk
E/AndroidRuntime( 1356): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
E/AndroidRuntime( 1356): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
E/AndroidRuntime( 1356): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
E/AndroidRuntime( 1356): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2513)
E/AndroidRuntime( 1356): ... 10 more
Does that mean the boot_completed is still recognized by my app but because it is disabled it cannot run? Or is it something else?
Thanks in advance!
So, apparently I had another app that had the option to activate my app (only when choosing so and not by default), so after reboot, it couldn’t find it’s apk as it was disabled. So I disabled the second app as well.

How to use both AppCompat action bar & nested fragments on Android 2.3?

Using nested fragments via XML or programmatically works great on a 4.2/4.3 device.
When 2.3 tries to use nested fragments and has AppCompat's action bar, it seems like the nested fragments want access to the action bar, but cannot find it... because they're nested in a fragment and should not have one.
I know there are some gotchas when using AppCompat like: AppCompat, fragments, & 2.3, and am hoping this can be solved just as easily.
XML layout:
<fragment
android:id="#+id/my_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:name="my.package.MyFragment"
tools:layout="#layout/my_layout" />
Manifest.xml:
<application
...
android:theme="#style/Theme.AppCompat.Light">
Stack trace:
E/AndroidRuntime( 6487): java.lang.RuntimeException: Unable to start activity ComponentInfo{your.package.here/your.package.here.SomeActivity}: java.lang.IllegalArgumentException: No view found for id 0x7f080014 (your.package.here:id/action_bar_activity_content) for fragment ProfileFragment{406160e0 #0 id=0x7f080014 SomeFragment}
E/AndroidRuntime( 6487): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
E/AndroidRuntime( 6487): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
E/AndroidRuntime( 6487): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
E/AndroidRuntime( 6487): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
E/AndroidRuntime( 6487): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 6487): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 6487): at android.app.ActivityThread.main(ActivityThread.java:3691)
E/AndroidRuntime( 6487): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 6487): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 6487): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
E/AndroidRuntime( 6487): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
E/AndroidRuntime( 6487): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 6487): Caused by: java.lang.IllegalArgumentException: No view found for id 0x7f080014 (your.package.here:id/action_bar_activity_content) for fragment SomeFragment{406160e0 #0 id=0x7f080014 SomeFragment}
E/AndroidRuntime( 6487): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:919)
E/AndroidRuntime( 6487): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)
E/AndroidRuntime( 6487): at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
E/AndroidRuntime( 6487): at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1460)
E/AndroidRuntime( 6487): at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:556)
E/AndroidRuntime( 6487): at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1129)
E/AndroidRuntime( 6487): at android.app.Activity.performStart(Activity.java:3833)
E/AndroidRuntime( 6487): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1624)
E/AndroidRuntime( 6487): ... 11 more
How can I fix this while still using nested fragments and the AppCompat action bar?

Navit Excepition:java.lang.ExceptionInInitializerError

While running the Navit code for car navigation, I am getting the following exception, i thought that navit library is not available. please any one help me.
E/AndroidRuntime( 365): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime( 365): java.lang.ExceptionInInitializerError
E/AndroidRuntime( 365): at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime( 365): at java.lang.Class.newInstance(Class.java:1472)
E/AndroidRuntime( 365): at android.app.Instrumentation.newActivity(Instrumentation.java:1097)
E/AndroidRuntime( 365): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2316)
E/AndroidRuntime( 365): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
E/AndroidRuntime( 365): at android.app.ActivityThread.access$2100(ActivityThread.java:116)
E/AndroidRuntime( 365): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
E/AndroidRuntime( 365): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 365): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 365): at android.app.ActivityThread.main(ActivityThread.java:4203)
E/AndroidRuntime( 365): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 365): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 365): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
E/AndroidRuntime( 365): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
E/AndroidRuntime( 365): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 365): Caused by: java.lang.UnsatisfiedLinkError: Library navit not found
E/AndroidRuntime( 365): at java.lang.Runtime.loadLibrary(Runtime.java:489)
E/AndroidRuntime( 365): at java.lang.System.loadLibrary(System.java:557)
i downloaded the Navit code from , navit svn.ttps://navit.svn.sourceforge.net/svnroot/navit/trunk/navit But unable to run the code.
i want to run this code in Eclipse for Android Project.
You need to download Android NDK
Create standalong tools for your ARCH
Cross compile to ARM
Run make apkg
This error is due to missing libnavit.so.
Put libnavit.so it in /data/local
Change System.LoadLibrary to System.Load("/data/local/libnavit.so");
make apkg
Install
This exception should go away.

Categories

Resources