Unable to launch calculator app with my first code

Code:

package test;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.remote.DesiredCapabilities;

import io.appium.java_client.MobileElement;
import io.appium.java_client.android.AndroidDriver;

public class Test1 {

public static void main(String[] args) throws MalformedURLException {
	// TODO Auto-generated method stub
	
	AndroidDriver<MobileElement> driver;
	
	DesiredCapabilities capabilities=new DesiredCapabilities();
	
	capabilities.setCapability("browser_Name", "Android");
	capabilities.setCapability("deviceName", "ZY223F2CX9");//ZY223F2CX9
	capabilities.setCapability("platformVersion", "7.0");
	capabilities.setCapability("platformName", "Android");
	capabilities.setCapability("appPackage", "com.android.calculator2");
	capabilities.setCapability("appActivity", "com.android.calculator2.Calculator");
	driver = new AndroidDriver<MobileElement>(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
	driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
	driver.quit();

}

}

Logs:

log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread “main” org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Command failed: C:\Windows\system32\cmd.exe /s /c “D:\Installations\SDK\Android\sdk1\platform-tools\adb.exe -s ZY223F2CX9 install “D:\Installations\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk””
Failed to install D:\Installations\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk: Failure [INSTALL_FAILED_ALREADY_EXISTS: Attempt to re-install io.appium.settings without first uninstalling.]
) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 8.97 seconds
Build info: version: ‘2.47.1’, revision: ‘411b314’, time: ‘2015-07-30 02:56:46’
System info: host: ‘MCKD-5382’, ip: ‘172.19.3.233’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_77’
Driver info: io.appium.java_client.android.AndroidDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:595)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:27)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:242)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:128)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:155)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:22)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:202)
at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:50)
at test.Test1.main(Test1.java:27)

Need help to know the issue exactly.

It seems your problem is being discussed in here:

Hi Chaitu,

“browser_Name”, “Android”—as u r automating the app browser_Name should be empty. or try with CapabilityType.BROWSER_NAME, “”
AndroidDriver driver—remove no need of it.

HI Narendra,

I have tried with your below suggestion.

still error:

Exception in thread “main” org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Command failed: C:\Windows\system32\cmd.exe /s /c “D:\Installations\SDK\Android\sdk1\platform-tools\adb.exe -s ZY223F2CX9 install “D:\Installations\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk””
Failed to install D:\Installations\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk: Failure [INSTALL_FAILED_ALREADY_EXISTS: Attempt to re-install io.appium.settings without first uninstalling.]
) (WARNING: The server did not provide any stacktrace information)