tbruyelle / RxPermissions

Android runtime permissions powered by RxJava2
Apache License 2.0
10.48k stars 1.31k forks source link

Fatal Exception: java.lang.RuntimeException: Unable to resume activity {com.xyz.dhsbd/com.tbruyelle.rxpermissions.ShadowActivity}: #190

Open gurmeet-global opened 7 years ago

gurmeet-global commented 7 years ago

Fatal Exception: java.lang.RuntimeException: Unable to resume activity {com.xyz.dhsbd/com.tbruyelle.rxpermissions.ShadowActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=42, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {com.xyz.dhsbd/com.tbruyelle.rxpermissions.ShadowActivity}: java.lang.IllegalStateException: RxPermissions.onRequestPermissionsResult invoked but didn't find the corresponding permission request. at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3500) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3540) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2764) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1509) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:163) at android.app.ActivityThread.main(ActivityThread.java:6228) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) Caused by java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=42, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {com.xyz.dhsbd/com.tbruyelle.rxpermissions.ShadowActivity}: java.lang.IllegalStateException: RxPermissions.onRequestPermissionsResult invoked but didn't find the corresponding permission request. at android.app.ActivityThread.deliverResults(ActivityThread.java:4176) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3474) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3540) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2764) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1509) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:163) at android.app.ActivityThread.main(ActivityThread.java:6228) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) Caused by java.lang.IllegalStateException: RxPermissions.onRequestPermissionsResult invoked but didn't find the corresponding permission request. at com.tbruyelle.rxpermissions.RxPermissions.onRequestPermissionsResult(RxPermissions.java:286) at com.tbruyelle.rxpermissions.ShadowActivity.onRequestPermissionsResult(ShadowActivity.java:32) at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:7147) at android.app.Activity.dispatchActivityResult(Activity.java:6999) at android.app.ActivityThread.deliverResults(ActivityThread.java:4172) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3474) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3540) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2764) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1509) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:163) at android.app.ActivityThread.main(ActivityThread.java:6228) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

gurmeet-global commented 7 years ago

@tbruyelle : Is above issue is due to compile 'com.tbruyelle.rxpermissions:rxpermissions:0.7.0@aar' old version gradle or we have to implement an extra check in over implementation?

cyberrob-zz commented 6 years ago

@gurmeet-global Please refer to those issues to see if similar to yours. Update to newer version could be a good try.

https://github.com/tbruyelle/RxPermissions/issues?q=is%3Aissue+com.tbruyelle.rxpermissions.ShadowActivity+is%3Aclosed