【Appium踩坑】Cannot start the ‘com.xx.xx‘ application. Visit https://github.com/appium/appium/blob/mast

原因

项目中配置的包名:com.tencent.music
实际手机上的包:com.tencent.music.push 或 没装包

解决

装上项目中预期的包就行了了了

详细报错
2022-06-22 16:10:03:013 - [debug] [W3C] Encountered internal error running command: Error: Cannot start the 'com.tencent.music' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Cannot start the 'com.tencent.music' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Activity name 'com.tencent.music.main.LaunchActivity' used to start the app doesn't exist or cannot be launched! Make sure it exists and is a launchable activity
2022-06-22 16:10:03:013 - [debug] [W3C]     at ADB.startApp (/usr/local/lib/node_modules/appium/node_modules/appium-adb/lib/tools/apk-utils.js:179:11)
2022-06-22 16:10:03:013 - [debug] [W3C]     at AndroidUiautomator2Driver.ensureAppStarts (/usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-driver/lib/driver.js:564:7)
2022-06-22 16:10:03:013 - [debug] [W3C]     at AndroidUiautomator2Driver.startUiAutomator2Session (/usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-driver/lib/driver.js:431:7)
2022-06-22 16:10:03:013 - [debug] [W3C]     at AndroidUiautomator2Driver.createSession (/usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-driver/lib/driver.js:229:7)
2022-06-22 16:10:03:013 - [debug] [W3C]     at AppiumDriver.createSession (/usr/local/lib/node_modules/appium/lib/appium.js:387:35)
2022-06-22 16:10:03:014 - [HTTP] <-- POST /wd/hub/session 500 3345 ms - 1597
2022-06-22 16:10:03:014 - [HTTP]

备注: 这个问题基本不太可能发生,记录下备忘吧

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值