启动App时出错。原始错误:com.abc.xyz.ui.SplashActivity或com.abc.xyz.dev.com.abc.xyz.ui.SplashActivity从未开始

时间:2018-01-30 16:58:38

标签: appium

我最近开始面对这个问题。

我将我的appium版本升级到1.6.5但在我尝试启动应用程序时运行自动化时出现以下错误。

[ADB] Error: com.abc.xyz.ui.SplashActivity or com.abc.xyz.dev.com.abc.xyz.ui.SplashActivity never started
    at Object.wrappedLogger.errorAndThrow (../../lib/logging.js:63:13)
    at ADB.callee$0$0$ (../../../lib/tools/apk-utils.js:153:7)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at <anonymous>

1 个答案:

答案 0 :(得分:0)

启动Android应用时,Appium无法自动匹配活动。 这可以通过提供您希望appium在capabilities中等待的活动和包名称来解决: E.g

"appWaitActivity" : "com.abc.xyz.ui.SomeActivity",
"appWaitPackage" : "com.abc.xyz"

您可以使用adb shell dumpsys activity获取应用的当前活动