Android minifyEnabled true causes app to crash - android

When I generate an app bundle (release) with minifyEnabled true, when I install the app on a device and run it I get this error:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: xxxxxxxxxxxxx PID: 12723
l.b
at i.a.h.a.c.d.i(:39)
at i.a.h.a.c.d.e(Unknown Source:10)
at f.s.d.i(:4)
at l.n.k.a.a.f(Unknown Source:8)
at d.a.i0.run(:2)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
NB: I edited the original question because Facebook was not the cause of the crash.

It's probably due to proguard rules that are not configured correctly. Check if it works when you add this to your proguard rules:
-keep class com.facebook.** {
*;
}

Related

java.lang.NoSuchMethodError: No static method b(Landroid/os/Bundle;Ljava/lang/String;Landroid/os/IBinder;)V in class Landroidx/core/app/e

I am getting this error on play console. Unable to properly figure out the source of the problem.
FATAL EXCEPTION: main
Process: com.madhurtexttospeechtts.madhur, PID: 7705
java.lang.NoSuchMethodError: No static method b(Landroid/os/Bundle;Ljava/lang/String;Landroid/os/IBinder;)V in class Landroidx/core/app/e; or its super classes (declaration of 'androidx.core.app.e' appears in base.apk)
at androidx.media.d$h.h(Unknown Source:46)
at androidx.media.d$h$d.onGetRoot(Unknown Source:15)
at android.service.media.MediaBrowserService$ServiceBinder$1.run(MediaBrowserService.java:229)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
you have to add this to your proguard-rules.pro file
-dontwarn org.xmlpull.v1.XmlPullParser
-dontwarn org.xmlpull.v1.XmlSerializer
-keep class org.xmlpull.v1.* {*;}
if error not solved after that also then re install your jdk
NoSuchMethodError usually caused by minifying and not adding proguard configuration.
Check your proguard config make sure you -keep the class containing the method.

How to resolve rxjava exception ? Below is log from firebase crashanalytics

I am getting below log . trying to find the root cause . Could anyone help me in explaining this issue.
Fatal Exception: q2.b.a.d.a: 2 exceptions occurred.
at io.reactivex.rxjava3.internal.observers.LambdaObserver.onError(LambdaObserver.java:80)
at io.reactivex.rxjava3.internal.observers.LambdaObserver.onNext(LambdaObserver.java:67)
at io.reactivex.rxjava3.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:201)
at io.reactivex.rxjava3.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:255)
at io.reactivex.rxjava3.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:123)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7386)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:980)

Android Singed APK crashed

I am facing issue with the Signed APK, debug apk works perfectly, When I generate signed apk and run it show error.
below is error log
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.woodenstreet, PID: 25818
java.lang.NoSuchMethodError: No virtual method x(Ljava/lang/String;I)I in class Lorg/json/JSONObject; or its super classes (declaration of 'org.json.JSONObject' appears in /apex/com.android.runtime/javalib/core-libart.jar)
at com.google.firebase.crashlytics.internal.settings.DefaultSettingsJsonTransform.d(SourceFile:1)
at com.google.firebase.crashlytics.internal.settings.DefaultSettingsJsonTransform.e(SourceFile:2)
at com.google.firebase.crashlytics.internal.settings.SettingsController.(SourceFile:11)
at com.google.firebase.crashlytics.internal.settings.SettingsController.l(SourceFile:14)
at com.google.firebase.crashlytics.internal.Onboarding.l(SourceFile:4)
at com.google.firebase.crashlytics.FirebaseCrashlytics.a(SourceFile:26)
at com.google.firebase.crashlytics.CrashlyticsRegistrar.b(SourceFile:5)
at com.google.firebase.crashlytics.CrashlyticsRegistrar.a(Unknown Source:0)
at com.google.firebase.crashlytics.CrashlyticsRegistrar$$Lambda$1.a(Unknown Source:2)
at com.google.firebase.components.ComponentRuntime.f(SourceFile:1)
at com.google.firebase.components.ComponentRuntime$$Lambda$1.get(Unknown Source:4)
at com.google.firebase.components.Lazy.get(SourceFile:6)
at com.google.firebase.components.ComponentRuntime.e(SourceFile:5)
at com.google.firebase.FirebaseApp.n(SourceFile:7)
at com.google.firebase.FirebaseApp.q(SourceFile:13)
at com.google.firebase.FirebaseApp.p(SourceFile:1)
at com.google.firebase.FirebaseApp.o(SourceFile:7)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(SourceFile:1)
at android.content.ContentProvider.attachInfo(ContentProvider.java:2092)
at android.content.ContentProvider.attachInfo(ContentProvider.java:2066)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(SourceFile:2)
at android.app.ActivityThread.installProvider(ActivityThread.java:6983)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6528)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6445)
at android.app.ActivityThread.access$1300(ActivityThread.java:219)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Here build.gradle app level file
Build file
I am not able to figure out the error please help me.
Thanks
Your release configuration in build.gradle is not correct for your libraries. I think it have to do with json, and proguard obfuscates some methods of it.
try this https://stackoverflow.com/a/61481954/10117882

No Activity found to handle Intent { act=com.android.car.developeroptions.action.DEMO_MODE }

I am trying to use the SystemUI demo mode using the AAOS emulator (see image below), but unfortunately this doesn't seem to work.
The build number is as shown here:
Logcat shows the following exception. I am wondering if this is a known issue and if it can be avoided somehow?
Process: com.android.car.developeroptions, PID: 4461
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.android.car.developeroptions.action.DEMO_MODE }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2058)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1716)
at android.app.Activity.startActivityForResult(Activity.java:5211)
at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:676)
at android.app.Activity.startActivityForResult(Activity.java:5169)
at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:663)
at android.app.Activity.startActivity(Activity.java:5540)
at android.app.Activity.startActivity(Activity.java:5508)
at androidx.preference.Preference.performClick(Preference.java:1199)
at androidx.preference.Preference.performClick(Preference.java:1166)
at androidx.preference.Preference$1.onClick(Preference.java:181)
at android.view.View.performClick(View.java:7259)
at android.view.View.performClickInternal(View.java:7236)
at android.view.View.access$3600(View.java:801)
at android.view.View$PerformClick.run(View.java:27892)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
the RenderService has not been supported on the AAOS, currently just testing the car templates-related apps on the Android Auto and using the DHU as the projected terminal. see details of the NOTES on the official webpage: Usage of Android for cars

Android OssLicensesMenuActivity crashes on start

I have added every needed dependency and plugins. My project is also generating third_party_licences files, but my app crashes when activity OssLicensesMenuActivity starts.
Errors here:
E/GmsClient: unable to connect to service: com.google.android.gms.oss.licenses.service.START on com.google.android.gms
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.axabee.seeplaces, PID: 12102
java.lang.NullPointerException: Attempt to invoke virtual method 'long com.google.android.gms.internal.oss_licenses.zzc.zze()' on a null object reference
at com.google.android.gms.internal.oss_licenses.zze.zza(Unknown Source:19)
at com.google.android.gms.oss.licenses.zzf.onComplete(Unknown Source:28)
at com.google.android.gms.tasks.zzj.run(Unknown Source:4)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

Categories

Resources