appium启动报错:
appium首次连接手机安装相关测试程序,启动报错
An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command 'E:\\tools\\android-sdk-windows\\platform-tools\\adb.exe -P 5037 -s 1aa3a2ca shell settings delete global hidden_api_policy_pre_p_apps' exited with code 255'; Stderr: 'Exception occurred while executing 'delete': java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS at com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:2641) at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1633) at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1625) at com.android.providers.settings.SettingsProvider.deleteGlobalSetting(SettingsProvider.java:1596) at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:662) at android.content.ContentProvider.call(ContentProvider.java:2473) at android.content.ContentProvider$Transport.call(ContentProvider.java:521) at com.android.providers.settings.SettingsService$MyShellCommand.deleteForUser(SettingsService.java:408) at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:282) at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97) at android.os.ShellCommand.exec(ShellCommand.java:38) at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:50) at android.os.Binder.shellCommand(Binder.java:970) at android.os.Binder.onTransact(Binder.java:854) at android.os.Binder.execTransactInternal(Binder.java:1226) at android.os.Binder.execTransact(Binder.java:1163)'; Code: '255'
解决方法:
1. 打开oppo开发者模式。开发者模式,后点开最下面的禁止权限监控。就可以安装appium的相关测试程序。