The following desired capabilities were provided,but not recognized by appium

The following desired capabilities were provided,but not recognized by appium.They will be passed on to any other services running on this server: version. How to resolve ?

capabilities.setCapability(MobileCapabilityType.DEVICE_NAME,“Galaxy Tab A”);
capabilities.setCapability(CapabilityType.BROWSER_NAME, “Chrome”);
capabilities.setCapability(CapabilityType.VERSION, “6.0.1”);
capabilities.setCapability(“platformName”, “Android”);
capabilities.setCapability(“appPackage”, “com.whatsapp”);
capabilities.setCapability(“appActivity”, “com.whatsapp.Main”);
capabilities.setCapability(“autoLaunch”, true);
driver = new RemoteWebDriver(new URL(“”), capabilities);
driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);

you have to use the capabilities like
caps.setCapability(“deviceName”, “Android Emulator”);
caps.setCapability(“deviceOrientation”, “portrait”);

caps.setCapability(“platformVersion”, “5.1”);
caps.setCapability(“platformName”, “Android”);
caps.setCapability(“appActivity”, androidConfig.getProperty(“appActivity”));
caps.setCapability(“appPackage”, androidConfig.getProperty(“appPakcage”));
//give the absolute path of your apk file
capabilities.setCapability(“app”, appdir.getAbsolutePath());

driver = new AndroidDriver(new URL(“”), capabilities);

caps.setCapability(“deviceName”, “Android Emulator”);
Its working … thank you swathi

swathi- same thing not working for me —I am getting below error after launching an app–

Exception in thread “main” org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Error occured while starting App. Original error: ‘com.quikr.old.SplashActivity’ never started (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 81.17 seconds

can some one pls help me here

Higher up in the Appium logs, it should indicate which package and activity it did find. Once you have those details, add the appPackage and appWaitActivity capabilities.

Reference to those caps is here.