I could not launch the android app in the device

199 views
Skip to first unread message

Gowtham Raja

unread,
Apr 25, 2014, 10:53:11 AM4/25/14
to appium-...@googlegroups.com

I could not launch the android app in the device facing below error, while running the test code

info: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Parameter 'appPackage' is required for launching application)","origValue":"Parameter 'appPackage' is required for launching application"},"sessionId":null}

I am using mac machine.

Can anyone help me.

Thanks in advance.

Ahmad Ghadiri

unread,
Apr 25, 2014, 12:16:53 PM4/25/14
to appium-...@googlegroups.com
I think as your log shows you need to add appPackage as a capabilities. In Appium 1.0.0 beta the app-package capabilities is changed to appPackage. 

DesiredCapabilities capabilities = new DesiredCapabilities();

capabilities.setCapability("device", "Android");

capabilities.setCapability(CapabilityType.BROWSER_NAME, "");

capabilities.setCapability("app", "absolue path to your app");

capabilities.setCapability("appPackage","name of your app");


if you install the app on your android device you can find appPackage name by running "adb shell pm list packages" and your package should be there.

Right now it is working for me. Hope it helps.

Thanks,

Ahmad

Gowtham Raja

unread,
Apr 25, 2014, 3:27:48 PM4/25/14
to appium-...@googlegroups.com
Much appreciated..

Now it's works fine for me.  

But I faced one more issue that is for appActivity, we need to add capabilities as "appPackage" instead of "app-package" and also "appActivity" as a capabilities instead of "app-activity" which i shown below,

DesiredCapabilities capabilities = new DesiredCapabilities();

capabilities.setCapability("device", "Android");

capabilities.setCapability(CapabilityType.BROWSER_NAME, "");

capabilities.setCapability("app", "absolue path to your app");

capabilities.setCapability("appPackage", "Name of your appPackage");

capabilities.setCapability("appActivity", "Name of your appActivity");

Now it's work good.

Thanks
Gowtham Raja
Reply all
Reply to author
Forward
0 new messages