googlesamples / easypermissions

Simplify Android M system permissions
https://firebaseopensource.com/projects/googlesamples/easypermissions/
Apache License 2.0
9.87k stars 1.46k forks source link

NullPointer in AppSettingsDialog #316

Open RahulBhavani opened 3 years ago

RahulBhavani commented 3 years ago

Basic Information

Device type: Android OS version: 8.1.0 EasyPermissions version: 3.0.0

Describe the problem

What happened? What did you expect to happen?

I had this crash in one of my user's device.

Code and logs

Caused by java.lang.NullPointerException Attempt to invoke direct method 'void pub.devrel.easypermissions.AppSettingsDialog.setActivityOrFragment(java.lang.Object)' on a null object reference pub.devrel.easypermissions.AppSettingsDialog.fromIntent (AppSettingsDialog.java:86) pub.devrel.easypermissions.AppSettingsDialogHolderActivity.onCreate (AppSettingsDialogHolderActivity.java:31) android.app.Activity.performCreate (Activity.java:7009) android.app.Activity.performCreate (Activity.java:7000) android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1214) android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2731) android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2856) android.app.ActivityThread.-wrap11 android.app.ActivityThread$H.handleMessage (ActivityThread.java:1589) android.os.Handler.dispatchMessage (Handler.java:106) android.os.Looper.loop (Looper.java:164) android.app.ActivityThread.main (ActivityThread.java:6494) java.lang.reflect.Method.invoke (Method.java) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:438) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:807)

elinkthings commented 3 years ago

I also encountered the same problem

drissfoo commented 3 years ago

Any solution for this issue ? happens only in Android 8.10 (Nexus 5X)

drissfoo commented 3 years ago

BTW i think it's the same issue as this one https://github.com/googlesamples/easypermissions/issues/278