手机自带的计算器没有问题,但是用 Selendroid 的就不行,下面是我的一些配置

appium 这个没有配置,有影响的吗


报错显示这个


这个是基本的代码

大神你看看是哪里出错了

[ADB] Running 'C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","BH90W67E0D","shell","dumpsys","window"]
[AndroidDriver] Screen already unlocked, doing nothing
[Selendroid] Starting selendroid server with instrumentation: selendroid.com.kuparts.service/io.selendroid.server.ServerInstrumentation
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","BH90W67E0D","shell","am","instrument","-e","main_activity","com.kuparts.home.MainActivity","selendroid.com.kuparts.service/io.selendroid.server.ServerInstrumentation"]
[ADB] Error: Unknown exception during instrumentation. Original error android.util.AndroidException: INSTRUMENTATION_FAILED: selendroid.com.kuparts.service/io.selendroid.server.ServerInstrumentation

    at Object.wrappedLogger.errorAndThrow (C:\Users\shihongxia\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-support\lib\logging.js:63:13)
    at ADB.callee$0$0$ (C:\Users\shihongxia\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\adb-commands.js:671:9)
    at tryCatch (C:\Users\shihongxia\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\shihongxia\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (C:\Users\shihongxia\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (C:\Users\shihongxia\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
    at process._tickCallback (internal/process/next_tick.js:103:7)
 Error: Unknown exception during instrumentation. Original error android.util.AndroidException: INSTRUMENTATION_FAILED: selendroid.com.kuparts.service/io.selendroid.server.ServerInstrumentation

    at Object.wrappedLogger.errorAndThrow (C:\Users\shihongxia\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-support\lib\logging.js:63:13)
    at ADB.callee$0$0$ (C:\Users\shihongxia\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\adb-commands.js:671:9)
    at tryCatch (C:\Users\shihongxia\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\shihongxia\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (C:\Users\shihongxia\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (C:\Users\shihongxia\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
    at process._tickCallback (internal/process/next_tick.js:103:7)
[Selendroid] Deleting Selendroid session
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","BH90W67E0D","shell","am","force-stop","com.kuparts.service"]
[Logcat] Stopping logcat capture
[MJSONWP] Encountered internal error running command: Error: Unknown exception during instrumentation. Original error android.util.AndroidException: INSTRUMENTATION_FAILED: selendroid.com.kuparts.service/io.selendroid.server.ServerInstrumentation

    at Object.wrappedLogger.errorAndThrow (C:\Users\shihongxia\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-support\lib\logging.js:63:13)
    at ADB.callee$0$0$ (C:\Users\shihongxia\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\adb-commands.js:671:9)
    at tryCatch (C:\Users\shihongxia\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\shihongxia\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (C:\Users\shihongxia\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (C:\Users\shihongxia\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
    at process._tickCallback (internal/process/next_tick.js:103:7)
[HTTP] <-- POST /wd/hub/session 500 18555 ms - 326


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