Appium运行时报does not have permission android.permission.CLEAR_APP_USER_DATA to clear data

Posted 丫头_de

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Appium运行时报does not have permission android.permission.CLEAR_APP_USER_DATA to clear data相关的知识,希望对你有一定的参考价值。

在oppo R11 操作系统:android8.1.0手机上运行h5 ui自动化用例时,报错:An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: \'Command \'/Users/amoliu/android/android-sdk_r24.4.1-macosx/platform-tools/adb -P 5037 -s 3cb2dc77 shell pm clear com.xiaomi.shop\' exited with code 1\'; Stderr: \'Error: java.lang.SecurityException: PID 22474 does not have permission android.permission.CLEAR_APP_USER_DATA to clear data of package com.xiaomi.shop\'; Code: \'1\'

尝试后2种方法可解决:

1)增加配置项noReset=true

2)除了常见开发者选项中打开usb调试,同时还需要开启以下2项,然后重启手机即可

 

 

 

 

以上是关于Appium运行时报does not have permission android.permission.CLEAR_APP_USER_DATA to clear data的主要内容,如果未能解决你的问题,请参考以下文章

oppo 手机不能连接appium,提示does not have permission android.permission.CLEAR_APP_USER_DATA to clear data

conda创建环境时报错:NotWritableError: The current user does not have write permissions to a required path.

FlinkFlink 运行报错 does not have any open files

does not have a NavController set on

解决 The swarm does not have a leader

RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn