Android12:内置第三方应用,权限控制器已停止运行,应用app已停止运行

1.设备先安装我提供的app【EasyControler】
2.设备--设置--关于手机--版本号(滑动到最下方)---连续点击六下打开 开发者模式
3.设置--系统--开发者模式--开发者选项 --打开usb调试
4.设置--安全设备管理应用--easycontrol的开关打开
5.将设备连接电脑  打开cmd命令框 输入指令:adb shell dpm set-device-owner com.easycontrol.emm/com.easycontrol.emm.receiver.DeviceOwnerReceiver
6.设备重启  重启后打开easycontrol的app  (如果开机后弹出xxx停止运行,将设备多重启几次) 打开app后  app首页显示正常的序列号,说明app正常运行
7.将设备的序列号导入到平台   设备联网  即可完成绑定

C:\Users\xxxxx>adb shell dpm set-device-owner com.easycontrol.emm/com.easycontrol.emm.receiver.DeviceOwnerReceiver
Success: Device owner set to package com.easycontrol.emm/.receiver.DeviceOwnerReceiver
Active admin set to component com.easycontrol.emm/.receiver.DeviceOwnerReceiver

报错原因:

11-07 10:23:11.591  5673  5690 E AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
11-07 10:23:11.591  5673  5690 E AndroidRuntime: Process: com.android.permissioncontroller, PID: 5673
11-07 10:23:11.591  5673  5690 E AndroidRuntime: java.lang.IllegalArgumentException: com.android.permissioncontroller: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_M
UTABLE be specified when creating a PendingIntent.
11-07 10:23:11.591  5673  5690 E AndroidRuntime: Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be
used with inline replies or bubbles.

11-07 10:23:11.591  5673

你可能感兴趣的:(android,java)