Obsolete
Status Update
Comments
vo...@gmail.com <vo...@gmail.com> #2
I'm seeing this same issue in our application. It's a low rate of error but so far every instance has been on Android 7.0. Many different devices and manufacturers represented. Uninstalling and reinstalling does not fix the problem for affected users.
lo...@gmail.com <lo...@gmail.com> #3
also got this bug. so far I have only seen it on Samsungs (Note4 and J1) with Android 6.0
yq...@gmail.com <yq...@gmail.com> #4
Any update for this issue?
From our user reports, it seems the issue is occurred after updating to 7.0 for our users.
Also, many users report us they see error message, app "keeps stopping", when crashing.
By searching google with its message, there are some other people using other apps also found this issue after updating.
https://www.google.co.jp/search?q=android+%22keeps+stopping%22&gws_rd=cr&ei=rz3KWKTJPJGA8QWgroOQCA#q=android+%22keeps+stopping%22&tbs=qdr:m&*
From our user reports, it seems the issue is occurred after updating to 7.0 for our users.
Also, many users report us they see error message, app "keeps stopping", when crashing.
By searching google with its message, there are some other people using other apps also found this issue after updating.
ta...@gmail.com <ta...@gmail.com> #5
I got this same issue.
I can't reproduce it but many crash report raised on Google Play Dev Console.
Devices are very various but Android version is seems to only Android 7.0 and 7.1.
I can't reproduce it but many crash report raised on Google Play Dev Console.
Devices are very various but Android version is seems to only Android 7.0 and 7.1.
si...@old.busybusy.com <si...@old.busybusy.com> #6
Same here. Casting the application to an interface that it DOES implement throws a ClassCastException on a few select Android devices on 7.0.
jo...@gmail.com <jo...@gmail.com> #7
I have received crash reports for this issue on the following devices:
Galaxy S7 (heroqlteatt)
Galaxy S7 (heroqltespr)
Galaxy S7 Edge (hero2qltetmo)
DROID Turbo 2 (kinzie)
LG Stylo 2 (ph1)
LG G5 (h1)
All of which were running Android 7.0
Galaxy S7 (heroqlteatt)
Galaxy S7 (heroqltespr)
Galaxy S7 Edge (hero2qltetmo)
DROID Turbo 2 (kinzie)
LG Stylo 2 (ph1)
LG G5 (h1)
All of which were running Android 7.0
hi...@gmail.com <hi...@gmail.com> #8
I've seen this bug from first version of Android 7.0 devices to date. It is occurring more often now when Samsung devices have 7.0 too. It seems to be related to the events of users updating their app and only solution to fix the issue is to reboot the phone.
[Deleted User] <[Deleted User]> #9
We are seeing this too in the wild, only on 7.0 and 7.1 devices. Cannot reproduce.
[Deleted User] <[Deleted User]> #10
I am also seeing this. In my case its happening inside `onCreate` of `FirebaseMessagingService` and happens only on 6.0 as per play store reports.
ro...@googlemail.com <ro...@googlemail.com> #11
I don't know if there's any connection, but I saw this on my own device (Pixel, 7.1.X) when doing a manual restore of a backup via adb shell (not very long after install of the app).
to...@elevatelabs.com <to...@elevatelabs.com> #12
We are also seeing these crashes on 7.x devices. Can't reproduce either. Crash happens both on an activity and on a service. Low frequency.
An interesting point is that the crashes appear on the android vitals section in the developer console but don't appear on fabric, not sure of the reason.
An interesting point is that the crashes appear on the android vitals section in the developer console but don't appear on fabric, not sure of the reason.
bo...@gmail.com <bo...@gmail.com> #13
We're experiencing the same issue. We get hundreds of Google Play crash reports caused by ClassCastException when casting Application class to our subclass, both in activities or services. None of these is reported by Crashlytics/Fabric though. We're unable to reproduce the crash in our environment. While our min SDK is 16, all of the reports come from Android 6 only.
((XXXApp) getApplication()).getAppComponent().inject(this);
in service:
java.lang.RuntimeException:
at android.app.ActivityThread.handleCreateService (ActivityThread.java:3035)
at android.app.ActivityThread.access$1900 (ActivityThread.java:150)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1495)
at android.os.Handler.dispatchMessage (Handler.java:102)
at android.os.Looper.loop (Looper.java:168)
at android.app.ActivityThread.main (ActivityThread.java:5885)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:797)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:687)
Caused by: java.lang.ClassCastException:
at <package_name>.FcmMessagingService.onCreate (FcmMessagingService.java:61)
at android.app.ActivityThread.handleCreateService (ActivityThread.java:3017)
in activity:
java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2440)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2500)
at android.app.ActivityThread.access$900 (ActivityThread.java:163)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1362)
at android.os.Handler.dispatchMessage (Handler.java:102)
at android.os.Looper.loop (Looper.java:148)
at android.app.ActivityThread.main (ActivityThread.java:5585)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:730)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:620)
Caused by: java.lang.ClassCastException:
at <package_name>.SplashActivity.b (SplashActivity.java:51)
at <package_name>.SplashActivity.onCreate (SplashActivity.java:25)
at android.app.Activity.performCreate (Activity.java:6279)
at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1108)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2393)
((XXXApp) getApplication()).getAppComponent().inject(this);
in service:
java.lang.RuntimeException:
at android.app.ActivityThread.handleCreateService (ActivityThread.java:3035)
at android.app.ActivityThread.access$1900 (ActivityThread.java:150)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1495)
at android.os.Handler.dispatchMessage (Handler.java:102)
at android.os.Looper.loop (Looper.java:168)
at android.app.ActivityThread.main (ActivityThread.java:5885)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:797)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:687)
Caused by: java.lang.ClassCastException:
at <package_name>.FcmMessagingService.onCreate (FcmMessagingService.java:61)
at android.app.ActivityThread.handleCreateService (ActivityThread.java:3017)
in activity:
java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2440)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2500)
at android.app.ActivityThread.access$900 (ActivityThread.java:163)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1362)
at android.os.Handler.dispatchMessage (Handler.java:102)
at android.os.Looper.loop (Looper.java:148)
at android.app.ActivityThread.main (ActivityThread.java:5585)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:730)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:620)
Caused by: java.lang.ClassCastException:
at <package_name>.SplashActivity.b (SplashActivity.java:51)
at <package_name>.SplashActivity.onCreate (SplashActivity.java:25)
at android.app.Activity.performCreate (Activity.java:6279)
at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1108)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2393)
ng...@google.com <ng...@google.com> #14
Chris I've heard there was a bug fixed in 7.1 around lifecycle. Is this one related?
va...@gmail.com <va...@gmail.com> #15
Also I am not seeing this in Fabric / Crashlytics and only in the Play Console.
For App A (not that many users):
I've gotten this until the 24th July this year and then it stopped until end of August, when I saw again some crashes. The devices are Galaxy S6 (zeroflte), Galaxy A5(2017) (a5y17lte), P9 (HWEVA), HUAWEI GR5 2017 (HWBLN-H) & P9 lite (HWVNS-H) all running Android 7.
For App B(more users):
I'm seeing this on a regular basis, almost every day on Android 7.0 and 7.1 with the following devices: P9 (HWEVA), P9 lite (HWVNS-H), One M9 (htc_himauhl), P10 lite (HWWAS-H), Honor 5C (HNNEM-H), Nexus 5X (bullhead), P10 (HWVTR), MATE 9 (HWMHA), 10 (htc_pmeuhl), RAINBOW 2 (RAINBOW_2), P8 lite 2017 (HWPRA-H), Xperia X Compact (F5321), Aquaris U lite (chaozulite), Galaxy S7 (herolte), Galaxy S7 Edge (hero2lte), Galaxy S6 (zeroflte), Galaxy S8 (dreamlte), Galaxy A3(2016) (a3xelte), Galaxy A5(2016) (a5xelte), Galaxy S6 Edge (zerolte), Galaxy A5(2017) (a5y17lte), Galaxy Tab A 10.1 (gtaxlwifi, Galaxy Tab S2 9.7 (gts210wifi), Galaxy S8+ (dream2lte).
Is there any more information that I can provide?
For App A (not that many users):
I've gotten this until the 24th July this year and then it stopped until end of August, when I saw again some crashes. The devices are Galaxy S6 (zeroflte), Galaxy A5(2017) (a5y17lte), P9 (HWEVA), HUAWEI GR5 2017 (HWBLN-H) & P9 lite (HWVNS-H) all running Android 7.
For App B(more users):
I'm seeing this on a regular basis, almost every day on Android 7.0 and 7.1 with the following devices: P9 (HWEVA), P9 lite (HWVNS-H), One M9 (htc_himauhl), P10 lite (HWWAS-H), Honor 5C (HNNEM-H), Nexus 5X (bullhead), P10 (HWVTR), MATE 9 (HWMHA), 10 (htc_pmeuhl), RAINBOW 2 (RAINBOW_2), P8 lite 2017 (HWPRA-H), Xperia X Compact (F5321), Aquaris U lite (chaozulite), Galaxy S7 (herolte), Galaxy S7 Edge (hero2lte), Galaxy S6 (zeroflte), Galaxy S8 (dreamlte), Galaxy A3(2016) (a3xelte), Galaxy A5(2016) (a5xelte), Galaxy S6 Edge (zerolte), Galaxy A5(2017) (a5y17lte), Galaxy Tab A 10.1 (gtaxlwifi, Galaxy Tab S2 9.7 (gts210wifi), Galaxy S8+ (dream2lte).
Is there any more information that I can provide?
ad...@gmail.com <ad...@gmail.com> #16
We are seeing this issue predominately in 7.0, and in 7.1 but at an extremely small rate.
Crashes by Android versions:
7.0 - 11,001
7.1 - 2
And absolutely none on any other version of the OS.
Crashes by Android versions:
7.0 - 11,001
7.1 - 2
And absolutely none on any other version of the OS.
ct...@google.com <ct...@google.com> #17
Yes, this is a known issue; and was largely addressed in 7.1. There are still some edge cases in 7.1 that can result in similar circumstances -- as you can see from your analytics -- but the window of opportunity is much narrower, and Android 8 addressed those as well.
[Deleted User] <[Deleted User]> #18
Should Application static instance solve this problem?
I will not call getApplication from application but rather directly get instance using static method.
class MyApp extends Application {
private static final sInstance;
public void onCreate() {
sInstance = this;
}
public static MyApp getInstance() {
return sInstance;
}
}
I still don't know if that can solve the problem. Since I cannot reproduce it.
I will not call getApplication from application but rather directly get instance using static method.
class MyApp extends Application {
private static final sInstance;
public void onCreate() {
sInstance = this;
}
public static MyApp getInstance() {
return sInstance;
}
}
I still don't know if that can solve the problem. Since I cannot reproduce it.
gr...@gmail.com <gr...@gmail.com> #19
In an app that has "public static MyApp getInstance()" we do not see the ClassCastException. I cannot explain why that approach is better than casting to (MyApp) It seems more risky to me, but it works. It could be a workaround for this issue
jo...@gmail.com <jo...@gmail.com> #20
Why is it considered more risky? @ post #19
kh...@gmail.com <kh...@gmail.com> #21
It's weird, today I see it happen with my app while I'm using it in my device (Samsung S7, Android 7.0). After restart, the app stops crash. There are thousands of user affected, it's so serious.
kh...@gmail.com <kh...@gmail.com> #22
post #18, #19, #20
Use static instance won't fix, I tried and get NullPointerException (so the application instance wasn't initialized). With me, restart phone is the only way to stop my app from crashing, reinstall or clear data don't fix.
Anyone has another workaround for this?
Use static instance won't fix, I tried and get NullPointerException (so the application instance wasn't initialized). With me, restart phone is the only way to stop my app from crashing, reinstall or clear data don't fix.
Anyone has another workaround for this?
sc...@gmail.com <sc...@gmail.com> #23
#22 We have the same trouble with NullPointerException after moving to static instance
sa...@gmail.com <sa...@gmail.com> #24
Hello guys, have the same problem. I noticed that behavior on the version of targetSDK = 27. I've tried to downgrade it to 26. I'll keep you informed if it solves the problem.
sa...@gmail.com <sa...@gmail.com> #25
But I can not understand why it is low priority bug? I have a lot of crashes every day. A user sometimes cannot open my app on the Android 7. Really, cannot open it. Just crash.
ts...@gmail.com <ts...@gmail.com> #26
I heard Autobackup feature may cause this issue because during backup/restore ActivityThread doesn't create a custom Application instance but a base Application instance. So disabling android:allowBackup in the AndroidManifest.xml may reduce crashes.
"In this restricted mode, the app's main activity is not automatically launched, its Content Providers are not initialized, and the base-class Application is instantiated instead of any subclass declared in the app's manifest."
https://developer.android.com/guide/topics/data/autobackup.html#ImplementingBackupAgent
"In this restricted mode, the app's main activity is not automatically launched, its Content Providers are not initialized, and the base-class Application is instantiated instead of any subclass declared in the app's manifest."
ou...@gmail.com <ou...@gmail.com> #27
Hey guys,
I have the very same problem around here. Although is a low rate bug, I can see it everyday. Has someone tested set allowBackup to false? Which implies this change (more RAM occupied size maybe)?
I would like to solve this one :S
Thanks.
Devices all happens to be at Android 6.0:
Nexus 5 (hammerhead) 1 8.3%
Moto G (2nd Gen) (titan_umts) 1 8.3%
Xperia M5 Dual (E5643) 1 8.3%
MUV PRO (Q5) 1 8.3%
5080A (shine_lite) 1 8.3%
NS5004 1 8.3%
Tesla 1 8.3%
Xperia™ C4 (E5306) 1 8.3%
R1 HD (BLU_R1_HD) 1 8.3%
Moto G (2nd Gen) (titan_udstv) 1 8.3%
Moto G (2nd Gen) (titan_umtsds) 1 8.3%
Smart turbo 7 (VFD500)
LG K10 LTE (m253) 5 33.3%
LG K8 LTE (mm1vn) 2 13.3%
Galaxy S5 (klte) 1 6.7%
Galaxy On7 (o7lte) 1 6.7%
LG G4 Beat (p1bssn) 1 6.7%
LG K8 (mm1v) 1 6.7%
LG X cam (k7) 1 6.7%
Galaxy A5 (a53g) 1 6.7%
Galaxy A7 (a7alte) 1 6.7%
Galaxy A7 (a7lte)
Some stacktrace from my app:
java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2426)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2490)
at android.app.ActivityThread.-wrap11 (ActivityThread.java)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1354)
at android.os.Handler.dispatchMessage (Handler.java:102)
at android.os.Looper.loop (Looper.java:148)
at android.app.ActivityThread.main (ActivityThread.java:5443)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:618)
Caused by: java.lang.ClassCastException:
at oob.lolprofile.HomeComponent.Framework.Fragment.Champion.ChampionsFragment.onCreateView (ChampionsFragment.java:70)
at android.support.v4.app.Fragment.performCreateView (Fragment.java:2261)
at android.support.v4.app.FragmentManagerImpl.moveToState (FragmentManager.java:1419)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState (FragmentManager.java:1750)
at android.support.v4.app.FragmentManagerImpl.moveToState (FragmentManager.java:1819)
at android.support.v4.app.BackStackRecord.executeOps (BackStackRecord.java:797)
at android.support.v4.app.FragmentManagerImpl.executeOps (FragmentManager.java:2590)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether (FragmentManager.java:2377)
at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute (FragmentManager.java:2332)
at android.support.v4.app.FragmentManagerImpl.execPendingActions (FragmentManager.java:2239)
at android.support.v4.app.FragmentManagerImpl.dispatchStateChange (FragmentManager.java:3231)
at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated (FragmentManager.java:3181)
at android.support.v4.app.FragmentController.dispatchActivityCreated (FragmentController.java:192)
at android.support.v4.app.FragmentActivity.onStart (FragmentActivity.java:572)
at android.support.v7.app.AppCompatActivity.onStart (AppCompatActivity.java:177)
at android.app.Instrumentation.callActivityOnStart (Instrumentation.java:1260)
at android.app.Activity.performStart (Activity.java:6261)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2389)
I have the very same problem around here. Although is a low rate bug, I can see it everyday. Has someone tested set allowBackup to false? Which implies this change (more RAM occupied size maybe)?
I would like to solve this one :S
Thanks.
Devices all happens to be at Android 6.0:
Nexus 5 (hammerhead) 1 8.3%
Moto G (2nd Gen) (titan_umts) 1 8.3%
Xperia M5 Dual (E5643) 1 8.3%
MUV PRO (Q5) 1 8.3%
5080A (shine_lite) 1 8.3%
NS5004 1 8.3%
Tesla 1 8.3%
Xperia™ C4 (E5306) 1 8.3%
R1 HD (BLU_R1_HD) 1 8.3%
Moto G (2nd Gen) (titan_udstv) 1 8.3%
Moto G (2nd Gen) (titan_umtsds) 1 8.3%
Smart turbo 7 (VFD500)
LG K10 LTE (m253) 5 33.3%
LG K8 LTE (mm1vn) 2 13.3%
Galaxy S5 (klte) 1 6.7%
Galaxy On7 (o7lte) 1 6.7%
LG G4 Beat (p1bssn) 1 6.7%
LG K8 (mm1v) 1 6.7%
LG X cam (k7) 1 6.7%
Galaxy A5 (a53g) 1 6.7%
Galaxy A7 (a7alte) 1 6.7%
Galaxy A7 (a7lte)
Some stacktrace from my app:
java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2426)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2490)
at android.app.ActivityThread.-wrap11 (ActivityThread.java)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1354)
at android.os.Handler.dispatchMessage (Handler.java:102)
at android.os.Looper.loop (Looper.java:148)
at android.app.ActivityThread.main (ActivityThread.java:5443)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:618)
Caused by: java.lang.ClassCastException:
at oob.lolprofile.HomeComponent.Framework.Fragment.Champion.ChampionsFragment.onCreateView (ChampionsFragment.java:70)
at android.support.v4.app.Fragment.performCreateView (Fragment.java:2261)
at android.support.v4.app.FragmentManagerImpl.moveToState (FragmentManager.java:1419)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState (FragmentManager.java:1750)
at android.support.v4.app.FragmentManagerImpl.moveToState (FragmentManager.java:1819)
at android.support.v4.app.BackStackRecord.executeOps (BackStackRecord.java:797)
at android.support.v4.app.FragmentManagerImpl.executeOps (FragmentManager.java:2590)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether (FragmentManager.java:2377)
at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute (FragmentManager.java:2332)
at android.support.v4.app.FragmentManagerImpl.execPendingActions (FragmentManager.java:2239)
at android.support.v4.app.FragmentManagerImpl.dispatchStateChange (FragmentManager.java:3231)
at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated (FragmentManager.java:3181)
at android.support.v4.app.FragmentController.dispatchActivityCreated (FragmentController.java:192)
at android.support.v4.app.FragmentActivity.onStart (FragmentActivity.java:572)
at android.support.v7.app.AppCompatActivity.onStart (AppCompatActivity.java:177)
at android.app.Instrumentation.callActivityOnStart (Instrumentation.java:1260)
at android.app.Activity.performStart (Activity.java:6261)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2389)
sa...@gmail.com <sa...@gmail.com> #28
I've tested with allowBackup = false. The problem has occurred anyway.
pa...@gmail.com <pa...@gmail.com> #29
Dear sa...@gmail.com.
Did you test targetSdkVersion update to 26?? Has the problem occurred still??
Did you test targetSdkVersion update to 26?? Has the problem occurred still??
[Deleted User] <[Deleted User]> #30
I wonder targetSdkVersion effects this issue too.
fr...@q42.nl <fr...@q42.nl> #31
It definately has to do with the backup. If you change your app's applicationId, it will launch fine.
fr...@q42.nl <fr...@q42.nl> #32
Edit: tested with a clean (guest) user: same problem. Might not be backup after all.
da...@gmail.com <da...@gmail.com> #33
Can we have some information on how this was addressed on Android 7.1 and 8? Maybe we can implement some workaround? Thanks!
ol...@gmail.com <ol...@gmail.com> #34
This issue still persists. It would at least be nice to know why this was closed and what we as app developers can to do work around the issue.
si...@old.busybusy.com <si...@old.busybusy.com> #35
My workaround is pretty lame, but I don't know of a better way to handle the issue. I have a try catch, and in the catch block I start another activity that tells the user that they need to restart their phone. There are some rare instances when restarting the phone doesn't fix it, but most of the time it does. This seems to happen for a few random users every time I release an app update.
jo...@gmail.com <jo...@gmail.com> #36
I do the same thing for my app, tell the user to restart, this happens every-time I release an update, which makes pushing updates scary for me. si...@busybusy.com are you using Dagger 1?
si...@old.busybusy.com <si...@old.busybusy.com> #37
No, I'm using Dagger 2
ho...@gmail.com <ho...@gmail.com> #38
I have the exact same problem but on Android 8.0 and 8.1. Seems like this can not be solved.
mr...@gmail.com <mr...@gmail.com> #39
The issue still persists. Is there an update for this?
is...@gmail.com <is...@gmail.com> #40
I have the same exception from the app every day. hope this could be fixed asap.
pa...@gmail.com <pa...@gmail.com> #41
This issue is becoming really frustrating. Why Google won't fix it?
pa...@gmail.com <pa...@gmail.com> #42
For whoever is looking at these tickets, I'm listing all the other tickets filed for this issue here:
th...@gmail.com <th...@gmail.com> #43
K vô dc macro
Description
---StackTrack----
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xxx/com.xxx.components.activity.LauncherActivity}: java.lang.ClassCastException: Cannot cast android.app.Application to com.xxx.xxApplication
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2742)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2803)
at android.app.ActivityThread.-wrap14(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1548)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6246)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:869)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:759)
Caused by: java.lang.ClassCastException: Cannot cast android.app.Application to com.xxx.xxApplication
at java.lang.Class.cast(Class.java:2308)
at com.xxx.components.activity.AbstractBaseActivity.setupComponent(AbstractBaseActivity.java:151)
at com.xxx.components.activity.AbstractBaseActivity.onCreate(AbstractBaseActivity.java:71)
at com.xxx.components.activity.LauncherActivity.onCreate(LauncherActivity.java:124)
at android.app.Activity.performCreate(Activity.java:6710)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2695)
... 9 more
----------------
-----AbstractBaseActivity.setupComponent----
private void setupComponent() {
AppComponentProvider provider = AppComponentProvider.class.cast(getApplication());
:
:
}
*xxApplication is implementing AppComponentProvider.
------------------------------------------------
-----AndroidManifest------
<application
android:name=".xxApplication"
---------------------------
I cannot reproduce this issue, and I don't understand why getApplication returns android.app.Application instead of my com.xxx.xxApplication.
It would be very helpful if you can figure this out, thanks.