Home > Mobile >  App crash after uploaded to play store , working correctly when installed from android studio
App crash after uploaded to play store , working correctly when installed from android studio

Time:10-21

Android app works perfectly on debug build and release build when directly installed from android studio but app crashes when install it from play store with this error:

Fatal Exception: java.lang.NullPointerException
       at java.io.File.<init>(File.java:363)
       at com.mappls.sdk.maps.MapplsStylesHelper.downloadImage(MapplsStylesHelper.java:12)
       at com.mappls.sdk.maps.MapplsStylesHelper.getLogos(MapplsStylesHelper.java:28)
       at com.mappls.sdk.maps.MapplsStylesHelper.initStyles(MapplsStylesHelper.java:94)
       at com.mappls.sdk.maps.MapplsStylesHelper.access$300(MapplsStylesHelper.java)
       at com.mappls.sdk.maps.MapplsStylesHelper$3.onResponse(MapplsStylesHelper.java:6)
       at retrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall$1$$ExternalSyntheticLambda1.run(R8$$SyntheticClass:29)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:236)
       at android.app.ActivityThread.main(ActivityThread.java:7864)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:620)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1011)

CodePudding user response:

Add your package as an exception in your ProGuard.

-keep class com.mappls.sdk.maps.** { *; }
  • Related