Appium运行java脚本,报错Activity used to start app doesn't exist or cannot be launched!Make sure

Appium在Eclipse中运行java脚本,在虚拟机测试ContactManager.apk报错提示> info: [debug] Device is at API Level 19> info: [debug] executing cmd: D:\Android\android-sdk\platform-tools\adb.exe -s emulator-5554 shell "am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.example.android/.ContactsTest"> error: Activity used to start app doesn't exist or cannot be launched! Make sure it exists and is a launchable activity> info: [debug] Stopping logcat capture

1、在你的程序中,初始化appium设置的appActivity这项,值不对,不是当前被测app启动时调用的activity

可以通过命令行aapt dump badging D:\xxx.apk,可以检查到此apk的packageName和activityName

要求先进去androidSDK的build-tools目录下

2、如果是存在此activity,则一定是AndroidMainfest.xml.xml中,当前activity设置的属性exported=false,表示当前activity无法被外部程序唤醒。(appium无法唤醒此类)

温馨提示:答案为网友推荐,仅供参考

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网