I have a issue regarding Appium Android emulator.
When I start with the Android emulator by launching it with cmd : emulator -avd emulaotr name.
The emulator takes a lot of time to load completely and due to this when i am trying to invoke an android app through appium server is generating the error : A new session could not be created. (Original error: UiAutomator quit before it successfully launched).
And often the android is getting stuck on the Android screen and not getting launched further. so till I launched emulator completely , I cant do nothing to invoke apps. please help.
I think this is due to slow emulator. How can i resolve it please suggest.
Code for the desired capabilities :
File appDir = new File("Src");
File app = new File(appDir, "honkamp.apk");
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability(MobileCapabilityType.PLATFORM_NAME,MobilePlatform.ANDROID);
cap.setCapability(MobileCapabilityType.DEVICE_NAME, "Android Emulator");
cap.setCapability(MobileCapabilityType.VERSION, "4.4.2");
cap.setCapability(MobileCapabilityType.APP_PACKAGE, "com.Honkampkrueger.hk");
cap.setCapability(MobileCapabilityType.BROWSER_NAME, "");
cap.setCapability(MobileCapabilityType.APP_ACTIVITY, ".MainActivity");
cap.setCapability(MobileCapabilityType.APP, app.getAbsolutePath());
AndroidDriver and = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),cap);
and.startActivity("appPackage","com.example.android.apis", null, null);
How can i launch android emulator much quicker completely to proceed further .
Please advice..............