在清单中找不到以下权限:[]8?我今天收到错误
No permissions found in manifest for: []8 ? I am getting the error today
final status = await Permission.phone.request();
if (status == PermissionStatus.denied) {
Fluttertoast.cancel();
Fluttertoast.showToast(msg: 'Please enable permission to access phone call', toastLength: Toast.LENGTH_LONG);
}
if (status == PermissionStatus.permanentlyDenied) {
Fluttertoast.cancel();
openAppSettings();
Fluttertoast.showToast(msg: 'Phone call permissions is permanently denied, we cannot request permissions.', toastLength: Toast.LENGTH_LONG);
}
if (status == PermissionStatus.granted) {
print('Successfull);
}
D/permissions_handler(17117):在清单中找不到权限:[]8
D/ViewRootImplToast: 硬件加速 = true , fakeHwAccelerated = false, sRendererDisabled = false, forceHwAccelerated = false, sSystemRendererDisabled = false
I/InputTransport(17117):创建 ARC 句柄:0x7a9894d140
在AndroidManifest.xml
中添加此代码
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-feature android:name="android.hardware.telephony" android:required="false" />
final status = await Permission.phone.request();
if (status == PermissionStatus.denied) {
Fluttertoast.cancel();
Fluttertoast.showToast(msg: 'Please enable permission to access phone call', toastLength: Toast.LENGTH_LONG);
}
if (status == PermissionStatus.permanentlyDenied) {
Fluttertoast.cancel();
openAppSettings();
Fluttertoast.showToast(msg: 'Phone call permissions is permanently denied, we cannot request permissions.', toastLength: Toast.LENGTH_LONG);
}
if (status == PermissionStatus.granted) {
print('Successfull);
}
D/permissions_handler(17117):在清单中找不到权限:[]8
D/ViewRootImplToast: 硬件加速 = true , fakeHwAccelerated = false, sRendererDisabled = false, forceHwAccelerated = false, sSystemRendererDisabled = false
I/InputTransport(17117):创建 ARC 句柄:0x7a9894d140
在AndroidManifest.xml
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-feature android:name="android.hardware.telephony" android:required="false" />