PlatformException(FlutterSoundPlugin,无权限授予,android.permission.RECORD_AUDIO或android.permission.WRITE_EXTERNAL_STORAGE)

时间:2018-11-27 03:33:08

标签: java android dart flutter android-permissions

尝试使用 flutter_sound 时出现此错误。其他所有权限均被授予权限,但“ WRITE_EXTERNAL_STORAGE”表示:

I/flutter (18339): startRecorder error: Exception:
PlatformException(FlutterSoundPlugin, NO PERMISSION GRANTED,
android.permission.RECORD_AUDIO or android.permission.WRITE_EXTERNAL_STORAGE)
D/AndroidRuntime(18339): Shutting down VM
E/AndroidRuntime(18339): FATAL EXCEPTION: main
E/AndroidRuntime(18339): Process: com.example.nw, PID: 18339
E/AndroidRuntime(18339): java.lang.RuntimeException: Failure delivering result
ResultInfo{who=@android:requestPermissions:, request=0, result=-1, data=Intent {
act=android.content.pm.action.REQUEST_PERMISSIONS
VirtualScreenParam=Params{mDisplayId=-1, null, mFlags=0x00000000)} (has extras)
}} to activity {com.example.nw/com.example.nw.MainActivity}:
java.lang.IllegalStateException: Reply already submitted

我已经尝试在 AndroidManifest.xml 中将tools:remove =“ androidSdkVersion”或tools:node =“ replace”附加到使用权限。

0 个答案:

没有答案