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无法唤醒此类)