java禁止多设备登录,android – 不允许设置设备所有者,因为设备上已有多个用户...

我正在关注此

tutorial以将应用程序设置为设备所有者.在该教程中,有一节“使用adb设置设备所有者”.这里的教程说明在安装Kiosk模式演示应用程序后,运行以下命令:

adb shell dpm set-device-owner sdg.example.kiosk_mode/.AdminReceiver

这给了我错误:

adb server is out of date. killing...

* daemon started successfully *

java.lang.IllegalStateException: Not allowed to set the device owner because there are already several users on the device

at android.os.Parcel.readException(Parcel.java:1629)

at android.os.Parcel.readException(Parcel.java:1574)

at android.app.admin.IDevicePolicyManager$Stub$Proxy.setDeviceOwner(IDevicePolicyManager.java:5146)

at com.android.commands.dpm.Dpm.runSetDeviceOwner(Dpm.java:114)

at com.android.commands.dpm.Dpm.onRun(Dpm.java:82)

at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)

at com.android.commands.dpm.Dpm.main(Dpm.java:38)

at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)

at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:257)

我跟着这个SO link,迭戈Plascencia Lara的答案帮助我摆脱了

adb server is out of date. killing...

* daemon started successfully *

但运行adb shell dpm set-device-owner sdg.example.kiosk_mode / .AdminReceiver命令后仍然出现以下错误:

java.lang.IllegalStateException: Not allowed to set the device owner because there are already several users on the device

at android.os.Parcel.readException(Parcel.java:1629)

at android.os.Parcel.readException(Parcel.java:1574)

at android.app.admin.IDevicePolicyManager$Stub$Proxy.setDeviceOwner(IDevicePolicyManager.java:5146)

at com.android.commands.dpm.Dpm.runSetDeviceOwner(Dpm.java:114)

at com.android.commands.dpm.Dpm.onRun(Dpm.java:82)

at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)

at com.android.commands.dpm.Dpm.main(Dpm.java:38)

at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)

at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:257)

为什么会发生此错误,如何删除?我之前曾尝试将不同的应用程序设置为设备所有者,但我认为我没有设法完全取消它们,并且在完成使应用程序在设备上运行的整个过程时总会出现一些错误.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值