nabinbhandari / Android-Permissions

Library for easy handling of android run-time permissions.
410 stars 84 forks source link

Exceptions arisies #1

Closed Hanzala717 closed 6 years ago

Hanzala717 commented 6 years ago

java.lang.RuntimeException: at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2421) at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2481) at android.app.ActivityThread.access$900 (ActivityThread.java:155) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1349) at android.os.Handler.dispatchMessage (Handler.java:102) at android.os.Looper.loop (Looper.java:174) at android.app.ActivityThread.main (ActivityThread.java:5440) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:616) Caused by: java.lang.NullPointerException: at android.content.pm.PackageManager.buildRequestPermissionsIntent (PackageManager.java:2659) at android.app.Activity.requestPermissions (Activity.java:3860) at com.nabinbhandari.android.permissions.PermissionsActivity.onCreate (PermissionsActivity.java:72) at android.app.Activity.performCreate (Activity.java:6285) at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1108) at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2374)

java.lang.RuntimeException: at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2955) at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3030) at android.app.ActivityThread.-wrap11 (Unknown Source) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1696) at android.os.Handler.dispatchMessage (Handler.java:105) at android.os.Looper.loop (Looper.java:164) at android.app.ActivityThread.main (ActivityThread.java:6938) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374) Caused by: java.lang.IllegalArgumentException: at android.content.pm.PackageManager.buildRequestPermissionsIntent (PackageManager.java:4007) at android.app.Activity.requestPermissions (Activity.java:4458) at com.nabinbhandari.android.permissions.PermissionsActivity.onCreate (PermissionsActivity.java:72) at android.app.Activity.performCreate (Activity.java:7174) at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1220) at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2908)

nabinbhandari commented 6 years ago

Thank you for your feedback. I guess you got this stacktrace from Play Console. I also found few stacktraces in my apps and tried to reproduce this issue multiple times but couldn't. If you can provide code which leads to this crash, please provide me with it.

I think that this problem can temporarily be solved by using try-catch inside the library. If any other workaround is not found, I will do that soon.

Hanzala717 commented 6 years ago

exactly I got it from play console and didn't have any other stack trace now

nabinbhandari commented 6 years ago

The crash has been fixed. Thank you.