运行后报SecurityException错误,动态运行权限中 定位和文件读写权限都给了
设备:MI MAX 3
系统版本:android10
MIUI版本:MIUI12.0.1稳定版
/**************这是刚创建安装程序时出现的错误*********************/
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.deepoit.natureintegrate, PID: 16120
java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=10, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {com.deepoit.natureintegrate/com.deepoit.natureintegrate.MainActivity}: java.lang.SecurityException: getDeviceId: The user 10388 does not meet the requirements to access device identifiers.
at android.app.ActivityThread.deliverResults(ActivityThread.java:4938)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4979)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2044)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7562)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Caused by: java.lang.SecurityException: getDeviceId: The user 10388 does not meet the requirements to access device identifiers.
at android.os.Parcel.createException(Parcel.java:2074)
at android.os.Parcel.readException(Parcel.java:2042)
at android.os.Parcel.readException(Parcel.java:1990)
at com.android.internal.telephony.ITelephony$Stub$Proxy.getDeviceId(ITelephony.java:10389)
at android.telephony.TelephonyManager.getDeviceId(TelephonyManager.java:1619)
at com.supermap.data.Environment.checkDevice_New(Environment.java:829)
at com.supermap.data.Environment.initialization(Environment.java:621)
at com.deepoit.natureintegrate.MainActivity.initEnvironment(MainActivity.java:292)
at com.deepoit.natureintegrate.MainActivity.onRequestPermissionsResult(MainActivity.java:338)
at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:8408)
at android.app.Activity.dispatchActivityResult(Activity.java:8253)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4931)
/***********************************/
/*************这是安装后第二次打开出现的错误**********************/
java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=10, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {com.deepoit.natureintegrate/com.deepoit.natureintegrate.MainActivity}: java.lang.SecurityException: getUniqueDeviceId: The user 10160 does not meet the requirements to access device identifiers.
at android.app.ActivityThread.deliverResults(ActivityThread.java:5589)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:5630)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2473)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8349)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
Caused by: java.lang.SecurityException: getUniqueDeviceId: The user 10160 does not meet the requirements to access device identifiers.
at android.os.Parcel.createException(Parcel.java:2071)
at android.os.Parcel.readException(Parcel.java:2039)
at android.os.Parcel.readException(Parcel.java:1987)
at com.android.internal.telephony.IHwTelephony$Stub$Proxy.getUniqueDeviceId(IHwTelephony.java:3156)
at android.telephony.HwTelephonyManagerInner.getUniqueDeviceId(HwTelephonyManagerInner.java:1251)
at android.telephony.HwInnerTelephonyManagerImpl.getUniqueDeviceId(HwInnerTelephonyManagerImpl.java:358)
at android.telephony.TelephonyManager.getDeviceId(TelephonyManager.java:1653)
at com.supermap.data.Environment.checkDevice_New(Environment.java:829)
at com.supermap.data.Environment.initialization(Environment.java:621)
at com.deepoit.natureintegrate.MainActivity.initEnvironment(MainActivity.java:292)
at com.deepoit.natureintegrate.MainActivity.onRequestPermissionsResult(MainActivity.java:338)
at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:8566)
at android.app.Activity.dispatchActivityResult(Activity.java:8416)
at android.app.ActivityThread.deliverResults(ActivityThread.java:5582)
/***********************************/