0

Android studio is not launching my device with the app, instead just the device alone. After the app is built with gradle it spins saying "waiting for device to come online".

Things I've tried:

  • In developer settings revoking permissions, turning on usb debugging, connecting and disconnecting a physical device
  • Wiping data and cold booting emulators
  • Different emulators on api 29 and 30, Pixel 3, 3a, 4
  • Changing from Media Device (MTP) to Camera (PTP)
  • Restarting my computer, Android Studio, Invalidating caches
  • Different JDKs, JVMs
  • Reinstalling Android Studio
  • Adjusting the permissions of Android studio using sudo chown -R $USER <path>
  • Restarting the abd server

Any suggestions would be great, here is a screen shot of the error as described for reference:

Emulator and physical device waiting to grant permissions

ryankuck
  • 320
  • 3
  • 15
  • I just tired a Nexus 5 emulator, API 29, and it has the same issue, it seems that upon start up some other stackoverflow solutions mention needing to accept permissions even with an emulator -- anyway something like the permission dialog shows up when launching and then crashes without fully displaying. – ryankuck Apr 08 '22 at 23:05

1 Answers1

0

Reading many questions along these lines I found a suggestion to run adb devices. Doing that revealed emulator-5554 unauthorized, and googling that showed a stack overflow question with the solution:

emulator-5554 unauthorized for adb devices

The solution: create a new device of any hardware type but don't use the recommended system images. Instead go to the x86 Images tab and select one with (Google Apis) instead of (Google Play).

No more restarting or cold booting or wiping after that, simply building the app resulted in it now launching!

enter image description here

ryankuck
  • 320
  • 3
  • 15