各位大神,麻烦帮忙看看这个错误时什么原因,改怎么解决;求大神帮忙
appium1.6.5+python3.4+android8.0.0 测试微信小程序时报以下错误(日志中从空格开始时报错地方),但是使用连接 android4.2.2 模拟器不会报错
目前自己试过更新 sdk 到 android8.1.0;但仍不能解决问题
代码如下:运行到箭头指向的 driver 这句时就报错

appium 报错日志:
ADB] Device API level: 26
[ADB] Getting connected devices...
[ADB] 2 device(s) connected
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","8c5b7053","shell","appops","set","io.appium.settings","android:mock_location","allow"]
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","8c5b7053","shell","appops","set","io.appium.settings","android:mock_location","allow"]
[AndroidDriver] Shutting down Android driver
[AndroidDriver] Called deleteSession but bootstrap wasn't active
[Logcat] Stopping logcat capture
[ADB] Getting connected devices...
[ADB] 2 device(s) connected
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","8c5b7053","shell","am","force-stop","io.appium.unlock"]
[AndroidDriver] Not cleaning generated files. Add clearSystemFiles capability if wanted.

[MJSONWP] Encountered internal error running command: Error: Error executing adbExec. Original error: 'Command 'D:\android-sdk\platform-tools\adb.exe -P 5037 -s 8c5b7053 shell appops set io.appium.settings android:mock_location allow' exited with code 4294967295'; Stderr: 'Security exception: uid 2000 does not have android.permission.UPDATE_APP_OPS_STATS.
java.lang.SecurityException: uid 2000 does not have android.permission.UPDATE_APP_OPS_STATS.
at android.app.ContextImpl.enforce(ContextImpl.java:1745)
at android.app.ContextImpl.enforcePermission(ContextImpl.java:1758)
at com.android.server.AppOpsService.setMode(AppOpsService.java:715)
at com.android.server.AppOpsService.onShellCommand(AppOpsService.java:2077)
at com.android.server.AppOpsService$Shell.onCommand(AppOpsService.java:1851)
at android.os.ShellCommand.exec(ShellCommand.java:96)
at com.android.server.AppOpsService.onShellCommand(AppOpsService.java:2025)
at android.os.Binder.shellCommand(Binder.java:576)
at android.os.Binder.onTransact(Binder.java:476)
at com.android.internal.app.IAppOpsService$Stub.onTransact(IAppOpsService.java:351)
at android.os.Binder.execTransact(Binder.java:679)'; Code: '4294967295'
at ADB.execFunc$ (C:\Users\Yang\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\system-calls.js:228:13)
at tryCatch (C:\Users\Yang\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke]


↙↙↙阅读原文可查看相关链接,并与作者交流