Appium Desktop, when starting a new session is "package And Launch Activity From Manifest failed"

With Appium Desktop, I am attempting to Start Session on a test .apk referred by Dave Haeffner.

adb devices shows my Android device.

Desired Capabilities:
“app”: “”,
“platformName”: “Android”,
“deviceName”: “Samsung Galaxy”

Errors when I try to start the session: packageAndLaunchActivityFromManifest failed.

[MJSONWP] Encountered internal error running command: Error: packageAndLaunchActivityFromManifest failed. Original error: Command ‘/Users/ventmahe/Library/Android/sdk/build-tools/23.0.1/aapt dump badging /var/folders/0h/hf79m7zj1xz1hdk0m3t091v8221rx6/T/2017314-967-qb7b8t.slkijurf6r/appium-app.apk’ exited with code 1
at Object.wrappedLogger.errorAndThrow (/Applications/
at ADB.callee$0$0$ (/Applications/
at tryCatch (/Applications/
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Applications/
at GeneratorFunctionPrototype.invoke (/Applications/
[HTTP] <-- POST /wd/hub/session 500 7333 ms - 393

… What am I doing wrong?

-T.J. Maher

I am also facing the same issue when starting a session with desired capabilities:
“platformName”: “Android”,
“platformVersion”: “8.0”,
“deviceName”: “Moto E2”,
“udid”: “TA09405IBZ”,
“app”: “C:\Users\gsonare\Desktop\Orange-TV.apk”,
“automationName”: “UiAutomator2”

Below are the appium logs:
[MJSONWP] Calling AppiumDriver.createSession() with args: [{“app”:“C:\Users\gsonare\Desktop\Orange-TV.apk”,“automationName”:“UiAutomator2”,“deviceName”:“Moto E2”,“platformName”:“Android”,“platformVersion”:“8.0”,“udid”:“TA09405IBZ”,“newCommandTimeout”:0,“connectHardwareKeyboard”:true},null,null]

[BaseDriver] Event ‘newSessionRequested’ logged at 1554373128401 (15:48:48 GMT+0530 (India Standard Time))

[Appium] Appium v1.12.1 creating new AndroidUiautomator2Driver (v1.33.0) session

[Appium] Capabilities:

[Appium] app: C:\Users\gsonare\Desktop\Orange-TV.apk

[Appium] automationName: UiAutomator2

[Appium] deviceName: Moto E2

[Appium] platformName: Android

[Appium] platformVersion: 8.0

[Appium] udid: TA09405IBZ

[Appium] newCommandTimeout: 0

[Appium] connectHardwareKeyboard: true

[BaseDriver] Creating session with MJSONWP desired capabilities: {“app”:"C:\Users\gsonare…

[BaseDriver] The following capabilities were provided, but are not recognized by appium: connectHardwareKeyboard.

[BaseDriver] Session created with session id: 36df09b6-5e0d-4428-ac6f-d16a8adf7cb7

[BaseDriver] Using local app ‘C:\Users\gsonare\Desktop\Orange-TV.apk’

[UiAutomator2] Checking whether app is actually present

[AndroidDriver] Retrieving device list

[ADB] Trying to find a connected android device

[ADB] Getting connected devices…

[ADB] 1 device(s) connected

[AndroidDriver] Using device: TA09405IBZ

[ADB] Setting device id to TA09405IBZ

[ADB] Running ‘C:\Users\gsonare\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s TA09405IBZ shell getprop’

[ADB] Current device property ‘’: 22

[ADB] Device API level: 22

[AndroidDriver] Parsing package and activity from app manifest

[ADB] Using the alternative activity name detection method because of: Could not find apkanalyzer.bat in C:\Users\gsonare\AppData\Local\Android\Sdk\platform-tools\apkanalyzer.bat,C:\Users\gsonare\AppData\Local\Android\Sdk\emulator\apkanalyzer.bat,C:\Users\gsonare\AppData\Local\Android\Sdk\tools\apkanalyzer.bat,C:\Users\gsonare\AppData\Local\Android\Sdk\tools\bin\apkanalyzer.bat,C:\Users\gsonare\AppData\Local\Android\Sdk\build-tools\29.0.0-rc1\apkanalyzer.bat,C:\Users\gsonare\AppData\Local\Android\Sdk\build-tools\28.0.3\apkanalyzer.bat. Do you have the Android SDK installed at ‘C:\Users\gsonare\AppData\Local\Android\Sdk’?

[ADB] Extracting package and launch activity from manifest

[UiAutomator2] Deleting UiAutomator2 session

[ADB] Removing forwarded port socket connection: 8200

[ADB] Running ‘C:\Users\gsonare\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s TA09405IBZ forward --remove tcp:8200’

[UiAutomator2] Unable to remove port forward ‘Error executing adbExec. Original error: ‘Command ‘C:\Users\gsonare\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s TA09405IBZ forward --remove tcp:8200’ exited with code 1’; Stderr: ‘adb.exe: error: listener ‘tcp:8200’ not found’; Code: ‘1’’

[BaseDriver] Event ‘newSessionStarted’ logged at 1554373130666 (15:48:50 GMT+0530 (India Standard Time))

[MJSONWP] Encountered internal error running command: Error: packageAndLaunchActivityFromManifest failed. Original error: Command ‘C:\Users\gsonare\AppData\Local\Android\Sdk\build-tools\29.0.0-rc1\aapt.exe dump badging C:\Users\gsonare\Desktop\Orange-TV.apk’ exited with code 1; StdErr: W/ziparchive(11120): Zip: missed a central dir sig (at 0)

[MJSONWP] W/zipro (11120): Error opening archive C:\Users\gsonare\Desktop\Orange-TV.apk: Iteration ended

[MJSONWP] ERROR: dump failed because no AndroidManifest.xml found


[MJSONWP] at ADB.packageAndLaunchActivityFromManifest (C:\Users\gsonare\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\android-manifest.js:188:9)

[HTTP] <-- POST /wd/hub/session 500 2267 ms - 630


[HTTP] --> DELETE /wd/hub/session

[HTTP] {}

[HTTP] No route found. Setting content type to ‘text/plain’

[HTTP] <-- DELETE /wd/hub/session 404 2 ms - 57


– Where I am going wrong, as the same piece of capability with same version of appium was up and running earlier.