Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Emulator instance does not show "Allow USB Debugging" confirmation to authenticate

I'm trying to run my mobile app in the Android Emulator from Android Studio. When I run the app, it prompts me to select the emulator instance:

enter image description here

When I select an emulator instance the build of the application starts and the emulator selected boots up.

enter image description here

After the build completes, Android Studio tells me that its "waiting for the target device to come online" so that it can authenticate with the bridge.

After waiting for some time, I do not get an "Allow USB Debugging" confirmation with an RSA thumbprint so I enable developer mode and go into the settings.

I then try and turn the setting "USB Debugging" off and then back on, I then restart the ADB service on my computer which results in the ADB service asking me to authorise the device (which I cant get the confirmation for)

enter image description here

I have tried this with a few other Android versions, which of only one has worked (API 27) (This version showed me the allow confirmation window as soon as the OS booted) I also checked to see if developer options were enabled on the working OS (API 27), they were not which indicates that the OS images are pre-configured as they are emulators and I shouldn't need to touch any of the settings.

This feels like its an image problem as one of the images (API 27) does work. Does anyone know why I cannot get the other API versions to give me a prompt to authenticate with the remote target?

One thing to note: On the versions that do not work, I cannot see a USB port on the device under Developer Options -> Select USB configuration but on the one working image I can see the USB port is detected and is set to "Charging".

API 27 (The image that works):

API 27 (The image that works)

API 25 (An image that does not work):

enter image description here

enter image description here

This is the prompt I expect to see so that the ADB service can communicate with the device:

enter image description here

like image 265
Kieran Devlin Avatar asked Mar 21 '19 10:03

Kieran Devlin


People also ask

How do I grant permission for USB debugging?

On the device, go to Settings > About <device>. Tap the Build number seven times to make Settings > Developer options available. Then enable the USB Debugging option.

Why can't ti enable USB debugging Android?

Go to Settings -> Connectivity -> Default Mode -> Internet Connection. Now enable the USB Debugging mode under Applications -> Development -> USB Debugging.


1 Answers

I was also facing same problem, but solved by wiping data and killing and restarting the adb server, but it also not worked for again* So , I used

Emulaor with no Play support

select no play store emulator

it only solved mine. Hope it will be helpful to anybody else

like image 101
kvadityaaz Avatar answered Oct 28 '22 10:10

kvadityaaz