美文网首页
Flutter permission-handler 请求权限

Flutter permission-handler 请求权限

作者: 不会弹吉他的二郎腿 | 来源:发表于2020-08-27 18:22 被阅读0次

如果本文内容对您有用,记得点个赞吧!

错误日志:
D/AndroidRuntime( 8448): Shutting down VM
E/AndroidRuntime( 8448): FATAL EXCEPTION: main
E/AndroidRuntime( 8448): Process: com.berkey.berkey, PID: 8448
E/AndroidRuntime( 8448): java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=25, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {com.berkey.berkey/com.berkey.berkey.MainActivity}: java.lang.IllegalStateException: Reply already submitted
E/AndroidRuntime( 8448): at android.app.ActivityThread.deliverResults(ActivityThread.java:4268)
E/AndroidRuntime( 8448): at android.app.ActivityThread.handleSendResult(ActivityThread.java:4312)
E/AndroidRuntime( 8448): at android.app.ActivityThread.-wrap19(Unknown Source:0)
E/AndroidRuntime( 8448): at android.app.ActivityThreadH.handleMessage(ActivityThread.java:1644) E/AndroidRuntime( 8448): at android.os.Handler.dispatchMessage(Handler.java:106) E/AndroidRuntime( 8448): at android.os.Looper.loop(Looper.java:164) E/AndroidRuntime( 8448): at android.app.ActivityThread.main(ActivityThread.java:6494) E/AndroidRuntime( 8448): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime( 8448): at com.android.internal.os.RuntimeInitMethodAndArgsCaller.run(RuntimeInit.java:438)
E/AndroidRuntime( 8448): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
E/AndroidRuntime( 8448): Caused by: java.lang.IllegalStateException: Reply already submitted
E/AndroidRuntime( 8448): at io.flutter.view.FlutterNativeView1.reply(FlutterNativeView.java:174) E/AndroidRuntime( 8448): at io.flutter.plugin.common.MethodChannelIncomingMethodCallHandler1.success(MethodChannel.java:203) E/AndroidRuntime( 8448): at com.baseflow.permissionhandler.PermissionHandlerPlugin.processResult(PermissionHandlerPlugin.kt:316) E/AndroidRuntime( 8448): at com.baseflow.permissionhandler.PermissionHandlerPlugin.handlePermissionsRequest(PermissionHandlerPlugin.kt:308) E/AndroidRuntime( 8448): at com.baseflow.permissionhandler.PermissionHandlerPlugin.accesshandlePermissionsRequest(PermissionHandlerPlugin.kt:28)
E/AndroidRuntime( 8448): at com.baseflow.permissionhandler.PermissionHandlerPluginCompanionregisterWith$1.onRequestPermissionsResult(PermissionHandlerPlugin.kt:46)
E/AndroidRuntime( 8448): at io.flutter.app.FlutterPluginRegistry.onRequestPermissionsResult(FlutterPluginRegistry.java:191)
E/AndroidRuntime( 8448): at io.flutter.app.FlutterActivityDelegate.onRequestPermissionsResult(FlutterActivityDelegate.java:125)
E/AndroidRuntime( 8448): at io.flutter.app.FlutterActivity.onRequestPermissionsResult(FlutterActivity.java:133)
E/AndroidRuntime( 8448): at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:7429)
E/AndroidRuntime( 8448): at android.app.Activity.dispatchActivityResult(Activity.java:7280)
E/AndroidRuntime( 8448): at android.app.ActivityThread.deliverResults(ActivityThread.java:4264)
E/AndroidRuntime( 8448): ... 9 more
Lost connection to device.

解决方案:


image.png
image.png

相关文章

网友评论

      本文标题:Flutter permission-handler 请求权限

      本文链接:https://www.haomeiwen.com/subject/rbkhsktx.html