I have a class ABCReceiver which extends WakefulBroadcastReceiver.
Intent serviceIntent = new Intent(context, DEFService.class);
serviceIntent.putExtras(intent);
startWakefulService(context, serviceIntent);
On GalaxyS4 device with OS 4.4.2, I get following exception:
`Non-fatal Exception: java.lang.RuntimeException: Unable to start receiver com.application.ABCReceiver: java.lang.RuntimeException: Parcel android.os.Parcel#2e8c37a4: Unmarshalling unknown type code 7274595 at offset 248
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2426)
at android.app.ActivityThread.access$1700(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1272)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5021)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:827)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:643)
at dalvik.system.NativeStart.main(NativeStart.java)
Caused by java.lang.RuntimeException: Parcel android.os.Parcel#2e8c37a4: Unmarshalling unknown type code 7274595 at offset 248
at android.os.Parcel.readValue(Parcel.java:2080)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2314)
at android.os.Bundle.unparcel(Bundle.java:249)
at android.os.Bundle.putInt(Bundle.java:470)
at android.content.Intent.putExtra(Intent.java:5553)
at android.support.v4.content.WakefulBroadcastReceiver.startWakefulService(WakefulBroadcastReceiver.java:88)
at com.application.ABCReceiver.onReceive(LocationReceiver.java:17)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2419)
at android.app.ActivityThread.access$1700(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1272)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5021)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:827)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:643)
at dalvik.system.NativeStart.main(NativeStart.java`
I am unable to reproduce this error. Kindly, help me in understanding what exactly is happening here and how can fix this error.
Thanks in advance.
Related
In My app When I go to the settings activity then back, my app force to stop the activity, I don't know which mistake is there.Please help me to solve that. Thanks for your help in advance!
08-13 11:36:36.355 21968-21968/com.example.user.dictationapp E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.user.dictationapp, PID: 21968
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.user.dictationapp/com.example.user.dictationapp.DictationVocab}: java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.widget.CompoundButton$SavedState
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2202)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2252)
at android.app.ActivityThread.access$800(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1200)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.widget.CompoundButton$SavedState
at android.widget.CompoundButton.onRestoreInstanceState(CompoundButton.java:378)
at android.view.View.dispatchRestoreInstanceState(View.java:12842)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2658)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2658)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2658)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2658)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2658)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2658)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2658)
at android.view.View.restoreHierarchyState(View.java:12820)
at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:1874)
at android.app.Activity.onRestoreInstanceState(Activity.java:949)
at android.app.Activity.performRestoreInstanceState(Activity.java:921)
at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1138)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2252)
at android.app.ActivityThread.access$800(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1200)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
at dalvik.system.NativeStart.main(Native Method)
android.view.AbsSavedState$1 cannot be cast to android.widget.CompoundButton$SavedState
Having experienced these ClassCastExceptions before, I'd suggest that you check that you do not have a same id being shared by different widgets. Also, check with layouts in different layout-qualifiers folders for the same condition.
I'm trying to build a .jar library that developers can use in their own apps. I have 3 views (activities) in my library that I'd like developers to be able to present in their apps like this:
// Developer's activity
public class MainActivity extends Activity {
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// This method returns an intent which calls
// an activity packaged in my .jar file
startActivity(EvelynsLibrary.showView(this));
}
}
The main library class EvelynsLibrary has a static 'showView' method which accepts an activity (to get context), creates an intent based on the context and an Activity bundled in my .jar, and returns an Intent, that the developer can show using startActivity.
Not sure if this is needed, but I have also added the external activity to the calling app's AndroidManifest.xml file like so:
<activity
android:name="com.evelyn.EvelynsActivity"
android:label="Evelyn"
android:configChanges="orientation|screenSize"
android:screenOrientation="fullSensor">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
I'm getting the following error:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myapp/com.evelyn.EvelynsActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f030002
Here is my entire error (Logcat) output:
11-19 02:52:30.760 597-642/? E/NetdConnector﹕ NDC Command {276 softap fwreload wlan0 STA} took too long (895ms)
11-19 02:52:35.245 597-644/? E/ConnectivityService﹕ Unexpected mtu value: android.net.wifi.WifiStateTracker#42bf90a8
11-19 12:05:26.209 597-642/? E/NetdConnector﹕ NDC Command {457 softap fwreload wlan0 STA} took too long (917ms)
11-19 12:05:30.793 597-644/? E/ConnectivityService﹕ Unexpected mtu value: android.net.wifi.WifiStateTracker#42bf90a8
11-19 12:05:34.167 1083-1354/? E/ActivityThread﹕ Failed to find provider info for com.google.android.wearable.settings
11-19 12:05:38.191 1083-1354/? E/ActivityThread﹕ Failed to find provider info for com.google.android.wearable.settings
11-19 12:08:56.234 2162-2162/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-19 12:08:56.274 2162-2162/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-19 23:18:00.632 1083-11946/? E/ActivityThread﹕ Failed to find provider info for com.google.android.wearable.settings
11-19 23:18:03.515 1083-11946/? E/ActivityThread﹕ Failed to find provider info for com.google.android.wearable.settings
11-19 23:36:43.087 597-644/? E/ConnectivityService﹕ Unexpected mtu value: android.net.wifi.WifiStateTracker#42bf90a8
11-20 01:03:10.368 13822-13822/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:03:10.488 13822-13822/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:03:17.034 13822-13822/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:04:16.552 13822-13822/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:05:18.422 13822-13822/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:13:00.193 14643-14643/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:13:25.428 14643-14643/? E/ActivityThread﹕ Activity com.choiceofgames.diabolical.Diabolical has leaked ServiceConnection com.anjlab.android.iab.v3.BillingProcessor$1#42b11268 that was originally bound here
android.app.ServiceConnectionLeaked: Activity com.choiceofgames.diabolical.Diabolical has leaked ServiceConnection com.anjlab.android.iab.v3.BillingProcessor$1#42b11268 that was originally bound here
at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:979)
at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:873)
at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1561)
at android.app.ContextImpl.bindService(ContextImpl.java:1544)
at android.content.ContextWrapper.bindService(ContextWrapper.java:517)
at com.anjlab.android.iab.v3.BillingProcessor.bindPlayServices(BillingProcessor.java:102)
at com.anjlab.android.iab.v3.BillingProcessor.<init>(BillingProcessor.java:95)
at com.choiceofgames.choicescript.Billing.<init>(Billing.java:57)
at com.choiceofgames.choicescript.ChoiceScriptActivity.onCreate(ChoiceScriptActivity.java:191)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
11-20 01:13:27.760 14643-14643/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:13:57.899 14643-14643/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:14:27.999 14643-14643/? E/ActivityThread﹕ Failed to find provider info for
11-20 01:36:32.631 14643-14643/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:37:02.740 14643-14643/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:37:32.830 14643-14643/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:38:02.949 14643-14643/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:38:33.058 14643-14643/? E/ActivityThread﹕ Failed to find provider info for
11-20 11:13:03.752 597-642/? E/NetdConnector﹕ NDC Command {639 softap fwreload wlan0 STA} took too long (995ms)
11-20 11:13:08.276 597-644/? E/ConnectivityService﹕ Unexpected mtu value: android.net.wifi.WifiStateTracker#42bf90a8
11-20 11:13:11.629 1083-18466/? E/ActivityThread﹕ Failed to find provider info for com.google.android.wearable.settings
11-20 11:13:15.303 1083-18466/? E/ActivityThread﹕ Failed to find provider info for com.google.android.wearable.settings
11-20 12:19:22.863 597-612/? E/WindowManager﹕ Starting window AppWindowToken{43a69c40 token=Token{42d66640 ActivityRecord{42840e90 u0 com.example.myExampleApp/.MyActivity t26}}} timed out
11-20 12:19:42.102 25049-25049/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.myExampleApp, PID: 25049
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myExampleApp/com.example.myExampleApp.MyActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.content.ComponentName.<init>(ComponentName.java:77)
at android.content.Intent.<init>(Intent.java:3813)
at com.evelyn.EvelynsLibrary.showView(EvelynsLibrary.java:22)
at com.example.myExampleApp.MyActivity.onCreate(MyActivity.java:17)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
11-20 12:42:19.597 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid parameter app
11-20 12:42:19.597 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid package name : Perhaps you didn't include a PendingIntent in the extras?
11-20 12:42:20.377 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid parameter app
11-20 12:42:20.377 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid package name : Perhaps you didn't include a PendingIntent in the extras?
11-20 12:42:20.698 26094-26100/com.example.myExampleApp E/jdwp﹕ Failed sending reply to debugger: Broken pipe
11-20 12:42:30.687 597-612/? E/WindowManager﹕ Starting window AppWindowToken{43f4bd98 token=Token{4311d8e8 ActivityRecord{42cefb90 u0 com.example.myExampleApp/.MyActivity t27}}} timed out
11-20 12:48:28.456 1083-1569/? E/PlayLoggerImpl﹕ Service was disconnected. Will try caching.
11-20 12:49:00.297 26565-26581/? E/libEGL﹕ validate_display:254 error 3008 (EGL_BAD_DISPLAY)
11-20 12:49:00.358 26565-26584/? E/OMXMaster﹕ A component of name 'OMX.qcom.audio.decoder.aac' already exists, ignoring this one.
11-20 12:51:29.873 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid parameter app
11-20 12:51:29.873 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid package name : Perhaps you didn't include a PendingIntent in the extras?
11-20 12:51:30.624 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid parameter app
11-20 12:51:30.624 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid package name : Perhaps you didn't include a PendingIntent in the extras?
11-20 12:51:32.996 26719-26719/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.myapp, PID: 26719
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myapp/com.example.myapp.MyExampleStartActivity}: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.myapp/com.evelyn.EvelynsActivity}; have you declared this activity in your AndroidManifest.xml?
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.myapp/com.evelyn.EvelynsActivity}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1628)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1424)
at android.app.Activity.startActivityForResult(Activity.java:3424)
at android.app.Activity.startActivityForResult(Activity.java:3385)
at android.app.Activity.startActivity(Activity.java:3627)
at android.app.Activity.startActivity(Activity.java:3595)
at com.example.myapp.MyExampleStartActivity.onCreate(MyExampleStartActivity.java:17)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
11-20 12:51:33.977 10994-10994/? E/chromium﹕ [ERROR:layer_tree_host_impl.cc(2121)] Forcing zero-copy tile initialization as worker context is missing
11-20 12:51:38.232 833-841/? E/DataBuffer﹕ Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: com.google.android.gms.common.data.DataHolder#4283e910)
11-20 12:51:38.232 833-841/? E/DataBuffer﹕ Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: com.google.android.gms.common.data.DataHolder#4289b088)
11-20 12:51:38.232 833-841/? E/DataBuffer﹕ Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: com.google.android.gms.common.data.DataHolder#42816e80)
11-20 12:51:38.232 833-841/? E/DataBuffer﹕ Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: com.google.android.gms.common.data.DataHolder#42a4b5b8)
11-20 12:53:44.995 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid parameter app
11-20 12:53:44.995 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid package name : Perhaps you didn't include a PendingIntent in the extras?
11-20 12:53:45.786 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid parameter app
11-20 12:53:45.786 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid package name : Perhaps you didn't include a PendingIntent in the extras?
11-20 12:53:47.988 597-610/? E/qcom_sensors_hal﹕ hal_process_time_resp: Resetting rollover count from 0 to 1
11-20 12:53:48.138 27195-27195/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.myapp, PID: 27195
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myapp/com.evelyn.EvelynsActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f030002
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f030002
at android.content.res.Resources.getValue(Resources.java:1123)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2309)
at android.content.res.Resources.getLayout(Resources.java:939)
at android.view.LayoutInflater.inflate(LayoutInflater.java:395)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
at android.app.Activity.setContentView(Activity.java:1929)
at com.evelyn.EvelynsActivity.setLayout(MainActivity.java:34)
at com.evelyn.EvelynsActivity.onCreate(MainActivity.java:146)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
11-20 12:54:02.352 597-633/? E/InputDispatcher﹕ channel '42877b50 com.example.myapp/com.example.myapp.MyExampleStartActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
11-20 12:54:05.135 597-610/? E/qcom_sensors_hal﹕ hal_process_time_resp: Resetting rollover count from 0 to 1
11-20 12:54:05.275 27304-27304/com.example.myapp E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.myapp, PID: 27304
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myapp/com.evelyn.EvelynsActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f030002
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f030002
at android.content.res.Resources.getValue(Resources.java:1123)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2309)
at android.content.res.Resources.getLayout(Resources.java:939)
at android.view.LayoutInflater.inflate(LayoutInflater.java:395)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
at android.app.Activity.setContentView(Activity.java:1929)
at com.evelyn.EvelynsActivity.setLayout(MainActivity.java:34)
at com.evelyn.EvelynsActivity.onCreate(MainActivity.java:146)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Question: Where am I going wrong? How can I achieve this and allow a developer to call my .jars activity?
You should create an Android Library project not a jar
If application stay in background mode more then 5 min. after that i try to open Application at that time got crash issue my Error log is here help me thanks in Advance....
java.lang.RuntimeException: Unable to start activity` ComponentInfo{com.gamestruct.TweetBoostAndroid/com.gamestruct.TweetBoostAndroid.TabbedActivity}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.gamestruct.TweetBoostAndroid/com.gamestruct.TweetBoostAndroid.EarnCoinActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2205)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2255)
at android.app.ActivityThread.access$800(ActivityThread.java:142)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5118)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:608)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.gamestruct.TweetBoostAndroid/com.gamestruct.TweetBoostAndroid.EarnCoinActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2205)
at android.app.ActivityThread.startActivityNow(ActivityThread.java:2043)
at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:135)
at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:347)
at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:749)
at android.widget.TabHost.setCurrentTab(TabHost.java:413)
at android.widget.TabHost.addTab(TabHost.java:240)
at com.gamestruct.TweetBoostAndroid.TabbedActivity.addTab(TabbedActivity.java:199)
at com.gamestruct.TweetBoostAndroid.TabbedActivity.setTabs(TabbedActivity.java:180)
at com.gamestruct.TweetBoostAndroid.TabbedActivity.onCreate(TabbedActivity.java:140)
at android.app.Activity.performCreate(Activity.java:5275)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2169)
... 11 more
Caused by: java.lang.NullPointerException
at com.gamestruct.TweetBoostAndroid.EarnCoinActivity.onCreate(EarnCoinActivity.java:110)
at android.app.Activity.performCreate(Activity.java:5275)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2169)
... 23 more
While your application stayed in the background it got killed by the system. Somewhere in com.gamestruct.TweetBoostAndroid.EarnCoinActivity.onCreate (presumably on line 110) you are using something that became null as your app was killed.
Does anyone have any idea about it? I did not save anything in HomeActivity.
Sorry I mean I don't save extra state, it's only the framework itself.
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.iproperty.android.apps.irealtor/com.iproperty.android.apps.irealtor.ui.HomeActivity}: java.lang.RuntimeException: Parcel android.os.Parcel#425e3308: Unmarshalling unknown type code 7536743 at offset 208
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(NativeStart.java)
Caused by: java.lang.RuntimeException: Parcel android.os.Parcel#425e3308: Unmarshalling unknown type code 7536743 at offset 208
at android.os.Parcel.readValue(Parcel.java:2080)
at android.os.Parcel.readListInternal(Parcel.java:2343)
at android.os.Parcel.readArrayList(Parcel.java:1703)
at android.os.Parcel.readValue(Parcel.java:2034)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2314)
at android.os.Bundle.unparcel(Bundle.java:249)
at android.os.Bundle.getSparseParcelableArray(Bundle.java:1273)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:876)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1121)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1103)
at android.support.v4.app.FragmentManagerImpl.dispatchCreate(FragmentManager.java:1896)
at android.support.v4.app.Fragment.performCreate(Fragment.java:1494)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:908)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1121)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1103)
at android.support.v4.app.FragmentManagerImpl.dispatchCreate(FragmentManager.java:1896)
at android.support.v4.app.Fragment.performCreate(Fragment.java:1494)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:908)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1121)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1103)
at android.support.v4.app.FragmentManagerImpl.dispatchCreate(FragmentManager.java:1896)
at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:216)
at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98)
at com.iproperty.android.apps.irealtor.ui.activity.BaseActivity.onCreate(BaseActivity.java:25)
at com.iproperty.android.apps.irealtor.ui.HomeActivity.onCreate(HomeActivity.java:64)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(NativeStart.java)
If the activity contain a fragment that have extra saveState, will it throw error on the HomeActivity?
I really don't know what's going on with the Android app I'm building. At some point on its development, I started getting it breaking as soon as it starts in the emulator, with the message "Foo stopped". Here is the error log, if anyone could help me:
07-05 21:13:30.063 7647-7647/root.fazerumsom E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: root.fazerumsom, PID: 7647
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{root.fazerumsom/root.fazerumsom.MainActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2110)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.content.ContextWrapper.getResources(ContextWrapper.java:89)
at android.view.ContextThemeWrapper.getResources(ContextThemeWrapper.java:78)
at root.fazerumsom.MainActivity.<init>(MainActivity.java:31)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1208)
at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2101)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
You're calling getResources() from a field initializer. Something like
private String mStr = getResources().getString(...);
(or with drawables or other kind of resources).
This is not valid, since the Context isn't set up yet. Move this assignment inside the onCreate() method.
The checked exception java.lang.NullPointerException is thrown when you're trying to use an object without reference,in simple words that means: you're trying to use a object variable without value.
Remember that a variable hold bits, primitive and non-primitive variable do, but the difference is that primitive variable hold the value in bits, but non-primitive variable hold the bits (like a direction) to access the object in memory, and when it's not being used anymore GGC (Garbage Colector) kills it.