appium: [Android] Setup failed when using avd capabilities

The problem

I’m using capability avd and uiautomator2 for launching emulator from my local windows desktop and getting error : Error: Appium Settings app is not running after 5000ms. I saw the log and notice this command :

[debug] [ADB] Running 'C:\Users\root\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am start -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running 'C:\Users\root\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep -f io\\.appium\\.settings'

Later i try to run this command manually and getting no results. However using the same capabilities for pre launched android emulator this command showing result. Seems there are problems when launching the io.appium.setting activity.

adb -P 5037 -s emulator-5554 shell pgrep -f io\\.appium\\.settings

Environment

Appium version -v1.17.1 Node.js version -v12.13.1 Npm or Yarn package manager: 6.14.2 Mobile platform/version under test: Android API 28 Real device or emulator/simulator: Android emulator Appium CLI or Appium.app|exe: appium cli

Details

Launch with uiautomator2

Link to Appium logs-https://gist.github.com/zethyscythe/f74dd3d729117a939bb58a1f8fb9476e

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17

Most upvoted comments

This makes sense. I’ll add a patch. Thanks for the update @Enrico204