Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NullPointerException due Attempt to invoke virtual method 'android.os.IBinder android.view.SurfaceControl.getHandle()' on a null object reference

Recently I did migration of my application to targetSdkVersion = 28. After publishing the updated app to Google Play I started to get very strange crash reports in Fabric.io: Crash report

Fatal Exception: java.lang.NullPointerException
Attempt to invoke virtual method 'android.os.IBinder android.view.SurfaceControl.getHandle()' on a null object reference
android.os.Parcel.createException (Parcel.java:1956)
android.os.Looper.loop (Looper.java:193)
android.app.ActivityThread.main (ActivityThread.java:6718)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:858)

This crash occurs only on Google devices(Pixel Series) with android Pie when app is opened by user from Play Store App, when opening from home screen everything works as expected. And there is no any trace to my code in crash report.

When I disable proguard everything works as expected

like image 242
vt600c Avatar asked Apr 08 '19 06:04

vt600c


1 Answers

You can add this rules to you proguard-rules.pro:

-keep class android.view.**

Other than that, could you include some of your proguard configuration?

like image 192
Jimly Asshiddiqy Avatar answered Oct 25 '22 09:10

Jimly Asshiddiqy