Scripts getting launched in emulator when real device is connected

Hi Team,
I’m new to this appium development.

When i launch my scripts, my scripts were running in emulator even though real device is connected.

Also when my script runs in emulator it is not launching the scripts. It is waiting for a long time and getting error as “Emulator not ready.” screen with font “andorid” still remains in the emulator.

This is my code

File classpathRoot = new File(System.getProperty(“user.dir”));
File appDir = new File(classpathRoot, “/Apps/Amazon/”);
File app = new File(appDir, “”);

	DesiredCapabilities capabilities = new DesiredCapabilities();
	capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android");
	capabilities.setCapability("deviceName", "Emulator");
	capabilities.setCapability("platformVersion", "5.1.1");
	capabilities.setCapability("platformName", "Android");
	capabilities.setCapability("app", app.getAbsolutePath());
	capabilities.setCapability("appPackage", "");
	capabilities.setCapability("appActivity", "");

	driver = new AndroidDriver(new URL(""), capabilities);
	driver.manage().timeouts().implicitlyWait(80, TimeUnit.SECONDS);

I have the app apk in my local machine.I don’t why this issue is occurring and i don’t where to change the settings to make it run in real device.

Please help me in resolving this issue.

Thanks in Advance.

the first thing i see is the deviceName … ‘Emulator’ only will not work
watch in cmd the command :
adb devices
it will show you all devices and emulator connected and their names.