Native app Test issue with Android 7

I am not able to test my app on android 7, It shows following logs when i launch appium with my app path.

Launching Appium server with command: C:\Program Files (x86)\Appium\node.exe lib\server\main.js --address 192.192.8.77 --port 4723 --app-activity .ContactManager --app-pkg com.example.android.contactmanager --app-wait-activity .ContactManager --app-wait-package com.example.android.contactmanager --no-reset --pre-launch --platform-name Android --platform-version 23 --automation-name Appium --log-no-color
warn: Appium support for versions of node < 0.12 has been deprecated and will be removed in a future version. Please upgrade!
info: [debug] Starting Appium in pre-launch mode
info: Pre-launching app
info: [debug] Didn’t get app but did get Android package, will attempt to launch it on the device
info: [debug] Creating new appium session d19c8866-a60c-4c9a-9526-ef868b6a8aae
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.8.0_73
info: [debug] Checking whether adb is present
info: [debug] Using adb from D:\sdk\platform-tools\adb.exe
warn: No app capability, can’t parse package/activity
info: [debug] Using fast reset? false
info: [debug] Preparing device for session
info: [debug] Not checking whether app is present since we are assuming it’s already on the device
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices…
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe devices
info: [debug] 1 device(s) connected
info: Found device emulator-5554
info: [debug] Setting device id to emulator-5554
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe -s emulator-5554 wait-for-device
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe -s emulator-5554 shell “echo ‘ready’”
info: [debug] Starting logcat capture
info: [debug] Getting device API level
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe -s emulator-5554 shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 24
info: Device API level is: 24
info: [debug] Extracting strings for language: default
info: [debug] Apk doesn’t exist locally
info: [debug] Could not get strings, but it looks like we had an old strings file anyway, so ignoring
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe -s emulator-5554 shell “rm -rf /data/local/tmp/strings.json”
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Skipping install since we launched with a package instead of an app path
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe -s emulator-5554 forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device…
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe -s emulator-5554 push “C:\Program Files (x86)\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar” /data/local/tmp/
info: [debug] Pushing settings apk to device…
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe -s emulator-5554 install “C:\Program Files (x86)\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk”
info: [debug] Stopping logcat capture
info: [debug] Logcat terminated with code null, signal SIGTERM
info: [debug] Sent shutdown command, waiting for UiAutomator to stop…
warn: UiAutomator did not shut down fast enough, calling it gone
error: Could not pre-launch appium: Error: Command failed: Failed to install C:\Program Files (x86)\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.]

Appium server process ended
Launching Appium server with command: C:\Program Files (x86)\Appium\node.exe lib\server\main.js --address 192.192.8.77 --port 4723 --app-activity .ContactManager --app-pkg com.example.android.contactmanager --app-wait-activity .ContactManager --app-wait-package com.example.android.contactmanager --no-reset --pre-launch --platform-name Android --platform-version 23 --automation-name Appium --log-no-color
warn: Appium support for versions of node < 0.12 has been deprecated and will be removed in a future version. Please upgrade!
info: [debug] Starting Appium in pre-launch mode
info: Pre-launching app
info: [debug] Didn’t get app but did get Android package, will attempt to launch it on the device
info: [debug] Creating new appium session 1be0d15d-7a63-4ae2-a30b-66d7d6c56333
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.8.0_73
info: [debug] Checking whether adb is present
info: [debug] Using adb from D:\sdk\platform-tools\adb.exe
warn: No app capability, can’t parse package/activity
info: [debug] Using fast reset? false
info: [debug] Preparing device for session
info: [debug] Not checking whether app is present since we are assuming it’s already on the device
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices…
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe devices
info: [debug] 1 device(s) connected
info: Found device emulator-5554
info: [debug] Setting device id to emulator-5554
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe -s emulator-5554 wait-for-device
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe -s emulator-5554 shell “echo ‘ready’”
info: [debug] Starting logcat capture
info: [debug] Getting device API level
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe -s emulator-5554 shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 24
info: Device API level is: 24
info: [debug] Extracting strings for language: default
info: [debug] Apk doesn’t exist locally
info: [debug] Could not get strings, but it looks like we had an old strings file anyway, so ignoring
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe -s emulator-5554 shell “rm -rf /data/local/tmp/strings.json”
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Skipping install since we launched with a package instead of an app path
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe -s emulator-5554 forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device…
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe -s emulator-5554 push “C:\Program Files (x86)\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar” /data/local/tmp/
info: [debug] Pushing settings apk to device…
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe -s emulator-5554 install “C:\Program Files (x86)\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk”
info: [debug] Pushing unlock helper app to device…
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe -s emulator-5554 install “C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk”
info: Starting App
info: [debug] Attempting to kill all ‘uiautomator’ processes
info: [debug] Getting all processes with ‘uiautomator’
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe -s emulator-5554 shell “ps ‘uiautomator’”
info: [debug] Stopping logcat capture
info: [debug] Logcat terminated with code null, signal SIGTERM
info: [debug] Sent shutdown command, waiting for UiAutomator to stop…
warn: UiAutomator did not shut down fast enough, calling it gone
error: Could not pre-launch appium: Error: Command failed:

Appium server process ended

Please provide solution

also when tried second time, getting below logs

warn: Appium support for versions of node < 0.12 has been deprecated and will be removed in a future version. Please upgrade!
info: [debug] Starting Appium in pre-launch mode
info: Pre-launching app
info: [debug] Didn’t get app but did get Android package, will attempt to launch it on the device
info: [debug] Creating new appium session b54c6f55-1e6c-4a1d-a842-1ebece380150
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.8.0_73
info: [debug] Checking whether adb is present
info: [debug] Using adb from D:\sdk\platform-tools\adb.exe
warn: No app capability, can’t parse package/activity
info: [debug] Using fast reset? false
info: [debug] Preparing device for session
info: [debug] Not checking whether app is present since we are assuming it’s already on the device
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices…
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe devices
info: [debug] 1 device(s) connected
info: Found device emulator-5554
info: [debug] Setting device id to emulator-5554
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe -s emulator-5554 wait-for-device
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe -s emulator-5554 shell “echo ‘ready’”
info: [debug] Starting logcat capture
info: [debug] Getting device API level
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe -s emulator-5554 shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 24
info: Device API level is: 24
info: [debug] Extracting strings for language: default
info: [debug] Apk doesn’t exist locally
info: [debug] Could not get strings, but it looks like we had an old strings file anyway, so ignoring
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe -s emulator-5554 shell “rm -rf /data/local/tmp/strings.json”
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Skipping install since we launched with a package instead of an app path
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe -s emulator-5554 forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device…
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe -s emulator-5554 push “C:\Program Files (x86)\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar” /data/local/tmp/
info: [debug] Pushing settings apk to device…
info: [debug] executing cmd: D:\sdk\platform-tools\adb.exe -s emulator-5554 install “C:\Program Files (x86)\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk”
info: [debug] Stopping logcat capture
info: [debug] Logcat terminated with code null, signal SIGTERM
info: [debug] Sent shutdown command, waiting for UiAutomator to stop…
warn: UiAutomator did not shut down fast enough, calling it gone
error: Could not pre-launch appium: Error: Command failed: Failed to install C:\Program Files (x86)\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.]

Appium server process ended

When we were testing with Appium 1.4.13, we manually uninstalled the two appium apks, settings_apk-debug.apk and unlock_apk-debug.apk when testing against Android N. I believe this is fixed in Appium 1.6.3 and above. THat being said, I’m having other troubles with Android N, but perhaps you won’t.