When I try using Appium to test my Hello World Android app, I get Activity used to start app doesn't exist! Make sure it exists
com.company.myapp
MainActivity
adt-bundle-mac-x86_64-20131030/sdk/tools/emulator -avd 4.4-KitKat-Nexus-4
app-activity
:
"MainActivity"
".MainActivity"
"com.company.myapp.MainActivity"
debug: Request received with params: {"desiredCapabilities":{"newCommandTimeout":"60","app":"/Users/me/Development/workspace/myapp/bin/myapp.apk","platform":"MAC","browserName":"","app-package":"com.company.myapp","device-ready-timeout":"60","device":"android","launch":"true","compressXml":"true","app-wait-activity":"com.company.myapp.MainActivity","app-activity":"com.company.myapp.MainActivity","version":"4.4"}}
adb -s emulator-5554 shell pm install -r [apk it found that it wants to keep]
, forwards port 4724
, wakes up device getting {"value":true,"status":0}
, ensures screen is unlocked ...And then it executes adb -s emulator-5554 shell am start -n com.company.myapp/com.company.myapp.MainActivity
and gives the error message above.
It also tries with . prepended to activity and gives the same error message.
I discovered that if the app was installed prior to running my test, it didn't complain about the Activity being absent.
And if I launch appium with appium --full-reset
it uninstalls the existing app and then installs some apk and finds the Activity.