Flutter:应用程序崩溃,运行时异常-答复已提交

时间:2019-10-01 05:15:38

标签: exception flutter dart permissions android-permissions

我在应用程序中使用sms_maintained,并且在调用发送消息方法时,它会提示您允许并在我们允许的情况下;该应用程序因控制台中的错误而崩溃。

D/AndroidRuntime(16973): Shutting down VM
E/AndroidRuntime(16973): FATAL EXCEPTION: main
E/AndroidRuntime(16973): Process: com.alena.my_application, PID: 16973
E/AndroidRuntime(16973): java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=2, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {com.alena.my_application/com.alena.my_application.MainActivity}: java.lang.IllegalStateException: Reply already submitted
E/AndroidRuntime(16973):    at android.app.ActivityThread.deliverResults(ActivityThread.java:4617)
E/AndroidRuntime(16973):    at android.app.ActivityThread.handleSendResult(ActivityThread.java:4659)
E/AndroidRuntime(16973):    at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49)
E/AndroidRuntime(16973):    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
E/AndroidRuntime(16973):    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
E/AndroidRuntime(16973):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1955)
E/AndroidRuntime(16973):    at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(16973):    at android.os.Looper.loop(Looper.java:214)
E/AndroidRuntime(16973):    at android.app.ActivityThread.main(ActivityThread.java:7078)
E/AndroidRuntime(16973):    at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(16973):    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/AndroidRuntime(16973):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)
E/AndroidRuntime(16973): Caused by: java.lang.IllegalStateException: Reply already submitted
E/AndroidRuntime(16973):    at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:151)
E/AndroidRuntime(16973):    at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java:225)
E/AndroidRuntime(16973):    at com.babariviere.sms.SmsSenderMethodHandler.sendSmsMessage(SmsSender.java:109)
E/AndroidRuntime(16973):    at com.babariviere.sms.SmsSenderMethodHandler.onRequestPermissionsResult(SmsSender.java:71)
E/AndroidRuntime(16973):    at io.flutter.app.FlutterPluginRegistry.onRequestPermissionsResult(FlutterPluginRegistry.java:194)
E/AndroidRuntime(16973):    at io.flutter.app.FlutterActivityDelegate.onRequestPermissionsResult(FlutterActivityDelegate.java:127)
E/AndroidRuntime(16973):    at io.flutter.app.FlutterActivity.onRequestPermissionsResult(FlutterActivity.java:137)
E/AndroidRuntime(16973):    at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:7941)
E/AndroidRuntime(16973):    at android.app.Activity.dispatchActivityResult(Activity.java:7763)
E/AndroidRuntime(16973):    at android.app.ActivityThread.deliverResults(ActivityThread.java:4610)
E/AndroidRuntime(16973):    ... 11 more
I/Process (16973): Sending signal. PID: 16973 SIG: 9
Lost connection to device.

我发现,许多其他开发人员的smscamera权限也有相同的问题。

。有可用的修复程序吗?

0 个答案:

没有答案