Jump to content
MikeMon

Android App Crash on Some Devices

Recommended Posts

Hi

 

I have an issue with an app crashing on some Android devices. The devices on which the app crashes are some Android 9 devices; although on other Android 9 devices the app works fine. The crash happens ONLY when the app is connected to the internet. When I disable the Wi-Fi, it doesn't crash. To test it, I run the app with the Wi-Fi disabled, it starts up fine. While the app is running I enable the Wi-Fi and the app crashes after a couple of seconds without me doing anything.

 

I've attached the Android log file if anyone could help me point out where the problem is.

 

Tx

log.txt

Share this post


Link to post

Does your app perform any network calls at all? If your package is cy.com.wagamama.ordercy, the log line at 12-05 18:34:30.888 seems to indicate it is doing at least something network related, and appears to be the source of the crash.

Share this post


Link to post
3 hours ago, Dave Nottage said:

Does your app perform any network calls at all? If your package is cy.com.wagamama.ordercy, the log line at 12-05 18:34:30.888 seems to indicate it is doing at least something network related, and appears to be the source of the crash.

HI Dave

 

Thank you for your answer.

 

Yes. The package is cy.com.wagamama.ordercy. The app does use network to communicate with a datasnap server, but even if I disable all network traffic, it is still crashing during startup.

 

I've attached a second log file without any datasnap calls.

log2.txt

Edited by MikeMon

Share this post


Link to post

This line is interesting:

 

12-06 00:30:44.030: I/agamama.orderc(31926): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.arch.lifecycle.LifecycleOwner" on path: DexPathList[[zip file "/data/app/cy.com.wagamama.ordercy-qsEct8E2Xh8zg2XEtOetZg==/base.apk"],nativeLibraryDirectories=[/data/app/cy.com.wagamama.ordercy-qsEct8E2Xh8zg2XEtOetZg==/lib/arm, /data/app/cy.com.wagamama.ordercy-qsEct8E2Xh8zg2XEtOetZg==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]

12-06 00:30:44.030: I/agamama.orderc(31926): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.arch.lifecycle.LifecycleOwner" on path: DexPathList[[zip file "/data/app/cy.com.wagamama.ordercy-qsEct8E2Xh8zg2XEtOetZg==/base.apk"],nativeLibraryDirectories=[/data/app/cy.com.wagamama.ordercy-qsEct8E2Xh8zg2XEtOetZg==/lib/arm, /data/app/cy.com.wagamama.ordercy-qsEct8E2Xh8zg2XEtOetZg==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]

Because android.arch.lifecycle.LifecycleOwner has long been deprecated:

 

  https://developer.android.com/reference/android/arch/lifecycle/LifecycleOwner

 

Is there perhaps some 3rd party library you're using that's expecting this class to be present? It may be present on the devices (for compatibility) that your app works on. Not sure if this is the root cause of your problem, but it might be worth looking at.

Share this post


Link to post
17 hours ago, Dave Nottage said:

This line is interesting:

 

12-06 00:30:44.030: I/agamama.orderc(31926): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.arch.lifecycle.LifecycleOwner" on path: DexPathList[[zip file "/data/app/cy.com.wagamama.ordercy-qsEct8E2Xh8zg2XEtOetZg==/base.apk"],nativeLibraryDirectories=[/data/app/cy.com.wagamama.ordercy-qsEct8E2Xh8zg2XEtOetZg==/lib/arm, /data/app/cy.com.wagamama.ordercy-qsEct8E2Xh8zg2XEtOetZg==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]


12-06 00:30:44.030: I/agamama.orderc(31926): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.arch.lifecycle.LifecycleOwner" on path: DexPathList[[zip file "/data/app/cy.com.wagamama.ordercy-qsEct8E2Xh8zg2XEtOetZg==/base.apk"],nativeLibraryDirectories=[/data/app/cy.com.wagamama.ordercy-qsEct8E2Xh8zg2XEtOetZg==/lib/arm, /data/app/cy.com.wagamama.ordercy-qsEct8E2Xh8zg2XEtOetZg==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]

Because android.arch.lifecycle.LifecycleOwner has long been deprecated:

 

  https://developer.android.com/reference/android/arch/lifecycle/LifecycleOwner

 

Is there perhaps some 3rd party library you're using that's expecting this class to be present? It may be present on the devices (for compatibility) that your app works on. Not sure if this is the root cause of your problem, but it might be worth looking at.

Hi Dave

 

The exception seems to be different everytime. I can't seem to figure out what the problem is. It works on some Android Pie devices and not on others. I've attached another log file that shows different entries leading to the crash.

log4.txt

Share this post


Link to post
10 hours ago, Dave Nottage said:

For this latest issue, see this link:

 

https://stackoverflow.com/a/50779232/3164070

And then there was light!!

 

Dave, this fixed the issue. Thank you very much for all the help!!

 

I added the below line to the <application> tag of the project's AndroidManifest.xml.

 

<uses-library android:name="org.apache.http.legacy" android:required="false" />

 

  • Thanks 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×