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

Hello everyone,
Today I got my first test on real device but when I try to run the script and get this error:
info: → POST /wd/hub/session {“capabilities”:{“desiredCapabilities”:{“app”:“C:\Users\Nguyen HUYNH\Downloads\Auto\Eclipse\AndroidTest\APK\mood_stories v1.0.30.apk”,“appPackage”:“com.-1/base.apk”,“appActivity”:“com.activity.LoginActivity”,“platformVersion”:“5.0.1”,“platformName”:“Android”,“device”:“Android”,“deviceName”:“4d00b50baa82407d”},“requiredCapabilities”:{}},“desiredCapabilities”:{“app”:“C:\Users\Nguyen HUYNH\Downloads\Auto\Eclipse\AndroidTest\APK\stories v1.0.30.apk”,“appPackage”:“com.-1/base.apk”,“appActivity”:“com.activity.LoginActivity”,“platformVersion”:“5.0.1”,“platformName”:“Android”,“device”:“Android”,“deviceName”:“4d00b50baa82407d”},“requiredCapabilities”:{}}

info: Client User-Agent string: Apache-HttpClient/4.5.2 (Java/1.8.0_121)
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : device
info: [debug] Using local app from desired caps: C:\Users\Nguyen HUYNH\Downloads\Auto\Eclipse\AndroidTest\APK\stories v1.0.30.apk
info: [debug] Creating new appium session 43ff262f-ab40-4b63-bbbb-b716542275e9
info: Starting android appium

info: [debug] Checking whether adb is present
info: [debug] Using adb from C:\Users\Nguyen HUYNH\android-sdks\platform-tools\adb.exe
info: [debug] Using fast reset? false
info: [debug] Preparing device for session
info: [debug] Checking whether app is actually present
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices…
info: [debug] executing cmd: “C:\Users\Nguyen HUYNH\android-sdks\platform-tools\adb.exe” devices
info: [debug] Could not find devices, restarting adb server…
info: [debug] executing cmd: “C:\Users\Nguyen HUYNH\android-sdks\platform-tools\adb.exe” kill-server
info: [debug] Getting connected devices…
info: [debug] executing cmd: “C:\Users\Nguyen HUYNH\android-sdks\platform-tools\adb.exe” devices
info: [debug] 1 device(s) connected
info: Found device 4d00b50baa82407d
info: [debug] Setting device id to 4d00b50baa82407d
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: “C:\Users\Nguyen HUYNH\android-sdks\platform-tools\adb.exe” -s 4d00b50baa82407d wait-for-device
info: [debug] Retrying restartAdb
Killed Node Server.
Appium server process ended

Here is my setting:

@BeforeTest
public void setUp() throws MalformedURLException {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(“device”, “Android”);
capabilities.setCapability(“platformName”, “Android”);
capabilities.setCapability(“platformVersion”, “5.0.1”);
capabilities.setCapability(“deviceName”, “4d00b50baa82407d”);

	File appDir = new File("C:\\Users\\Nguyen HUYNH\\Downloads\\Auto\\Eclipse\\AndroidTest\\APK");
																			
	File app = new File(appDir, "stories v1.0.30.apk");
	capabilities.setCapability("app", app.getAbsolutePath());
	capabilities.setCapability("appPackage", "com.-1/base.apk");

	capabilities.setCapability("appActivity", "com.activity.LoginActivity");
	driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
}

I’m appreciated for your help
Thanks

I would suggest to search for any open source appium + java project on github , refer to most starred or forked project and learn from it ( same as I’m doing :slight_smile: )