在Android 10中获得“无活动管理员”SecurityException-如何解决?

fnatzsnv  于 2023-06-04  发布在  Android
关注(0)|答案(1)|浏览(618)

在测试期间,我在Google Play控制台上的预启动报告中遇到错误。错误消息如下:

java.lang.SecurityException: No active admin ComponentInfo{com.google.android.apps.mtaas.deviceadmin/com.google.android.apps.mtaas.deviceadmin.DeviceAdminReceiver}

此错误特别发生在Android 10(SDK 29)中。完整的错误摘要如下:

Exception Process: com.google.android.apps.mtaas.deviceadmin, PID: 4380
java.lang.SecurityException: No active admin ComponentInfo{com.google.android.apps.mtaas.deviceadmin/com.google.android.apps.mtaas.deviceadmin.DeviceAdminReceiver}
  at android.os.Parcel.createException (Parcel.java:2088)
  at android.os.Parcel.readException (Parcel.java:2056)
  at android.os.Parcel.readException (Parcel.java:2004)
  at android.app.admin.IDevicePolicyManager$Stub$Proxy.setNetworkLoggingEnabled (IDevicePolicyManager.java:15305)
  at android.app.admin.DevicePolicyManager.setNetworkLoggingEnabled (DevicePolicyManager.java:11627)
  at com.google.android.apps.mtaas.deviceadmin.EnableNetworkLogging.onStart (EnableNetworkLogging.kt:27)
  at android.app.Instrumentation$InstrumentationThread.run (Instrumentation.java:2209)
Caused by android.os.RemoteException: Remote stack trace:
  at com.android.server.devicepolicy.DevicePolicyManagerService.getActiveAdminWithPolicyForUidLocked (DevicePolicyManagerService.java:3259)
  at com.android.server.devicepolicy.DevicePolicyManagerService.getActiveAdminOrCheckPermissionForCallerLocked (DevicePolicyManagerService.java:3155)
  at com.android.server.devicepolicy.DevicePolicyManagerService.getActiveAdminForCallerLocked (DevicePolicyManagerService.java:3136)
  at com.android.server.devicepolicy.DevicePolicyManagerService.enforceCanManageScopeOrCheckPermission (DevicePolicyManagerService.java:7218)
  at com.android.server.devicepolicy.DevicePolicyManagerService.enforceCanManageScope (DevicePolicyManagerService.java:7204)

我需要帮助来解决此特定错误。任何帮助或指导都将不胜感激。

ohfgkhjo

ohfgkhjo1#

不久前刚收到同样的报告。看起来有一个与Google用于生成报告的设备/模拟器相关的问题。
至少在我的例子中,它与测试的应用程序无关,因为它对Google库没有任何依赖
编辑:您可以在Google Issue Tracker中找到类似的报告:https://issuetracker.google.com/issues/160907013#comment144

相关问题