google / android-emulator-m1-preview

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Android Studio is infinitely Waiting for device to come online .

ramanic opened this issue · comments

When I run the app from android studio , emulator starts and run but the app cannot be installed because android studio is showing Waiting for device to come online message,I waited for an hour but its still showing same message ,emulator is completely started and working fine. I tried restarting abd server reinstalling emulator nothing is working . I tried the command adb devices the emulator is displayed offline.

How can I fix the adb device offline issue ?

I also have the same issue

This comes with x86 Emulator as well.
Most of the time, a reboot of Android Studio and Emulator solves it for me.

This comes with x86 Emulator as well.
Most of the time, a reboot of Android Studio and Emulator solves it for me.

I tried restarting emulator, android studio and my laptop too, I even deleted and created new emulator .. sill getting the issue.

This comes with x86 Emulator as well.
Most of the time, a reboot of Android Studio and Emulator solves it for me.

I tried restarting emulator, android studio and my laptop too, I even deleted and created new emulator .. sill getting the issue.

i also have uninstalled android studio and install it again, also uninstalled android emulator and re-install but not working

I have made it work but without the version from AVD manager,
what I have done is downloaded Initial Preview v3: Google APIs System Image
and added this emulator to applications and run android studio

Hmm, maybe it depends on installation way ? I did it like this 741g/android-emulator-m1-preview#10 (comment)

Hmm, maybe it depends on installation way ? I did it like this 741g/android-emulator-m1-preview#10 (comment)

as I understand from the way you used to install manually without avd manager, and then moved the downloaded emulator to Library/Android/sdk
is this the same emulator we download from avd manager or another one?

Not sure if it is the right way, but I got that fixed by download and run it on InteliJ (universal) instead of Android Studio and my Emulator is (v.03).

I'm running into this as well, so much love if someone figures it out

This is pain.

I opened a Google issue https://issuetracker.google.com/issues/189615411
(please star it, to show Google this is a real issue !)

Inside there is my current workaround

I was able to solve it my complete re-install of ~/Library/Android/sdk

But curious, I installed Android Studio Bumblebee | 2021.1.1 Canary 2 and now I can debug again.

Somethings weird, the m1-preview emulator fails to connect to internet/wifi too. Is it just me?

Somethings weird, the m1-preview emulator fails to connect to internet/wifi too. Is it just me?

Just you

I also have the same issue on Mac m1

commented

I have the same issue on windows 10, where the device is clearly working and online but the bar is still scrolling. Sometimes rebuilding and restarting work, but it happens so frequently that it ruins development flow.

Had a similar issue with Android Studio Arctic Fox 2020.3.1 Patch 3 on Windows 10. It would just freeze frequently after doing a build and run targeting a connected device. It seems that cleaning up my source tree fixed the issue. Just delete .gradle .idea and other build folders and reload your project in a brand new Android Studio environment. Nothing to do with Apple M1 emulator though obviously. However I landed here after searching online for this issue and apparently I'm not the only one.

This issue comes to me after I relocate Android Studio with all folders like .android, .gradle. From C to D disk.
I resolved that so
Environment variables
ANDROID_AVD_HOME--------D:\Your_Profil\AppData\Local\Android\avd
ANDROID_SDK_HOME--------D:\Your_Profil\AppData\Local\Android
GRADLE_HOME ---------------D:\Your_Profil\AppData\Local\Android.gradle
In Android studio -> file -> settings ->build ->build tools -> gradle -> gradle user home.
And watch for that files adbkey and adbkey.pub they should to be in D:\Your_Profil\AppData\Local\Android
Without them emulators with Play store wouldn't work.
And click periodically wipe data.
I hope I helped.

I solved it by changing the regional format to English.

Go to Windows Settings -> Language and region, and change it to "English (United States)"

I just updated to Bumblebee and the emulator is stuck at "connecting to the emulator".. I tried deleting the emulators and creating new ones. Nothing worked...

Mac m1 here, i removed everything android related from my machine. i installed a fresh copy of android studio bumblebee and i face the same issue. The emulator cannot start. It's stuck in "is stuck at "connecting to the emulator". Activity monitor shows a 100% cpu usage of the "qemu-system-aarch64" process, also marked as not responding.

After 300seconds i see a timeout error.

@Seferi, @thanosbellos
This solution worked for me

Just verified that a clean install of Bumblebee as well as an upgrade of Arctic Fox to 2021.11.20 result in this behavior on MacBook Air M1. Same thing if installing both versions in parallel. Also, after Bumblebee install or upgrade Arctic Fox will now exhibit the same bug in perpetuity.

The solution above (wojewski) is not really a solution. The emulator processes are actually launched and turn up right away in Activity Monitor as red runaways. Launching the emulator as its own app instead of in the IDE just gives the system a way to force-kill it to then send a report to Apple. Every time!

This is a well-known defect, unfortunately no one cares. I mean they must have installed BumbleBee on at least one MacBook in testing.

commented

It's even funnier given the fact that all Google employees are using Macs in literally every presentation. This should be the best supported platform. Alas, on my Dell XPS this particular issue does not show up, but instead Studio isn't able to propely launch the ADB bridge and I have to do it manually. Seems to me like Bumblebee should have stayed in beta for some more time.

commented

In https://issuetracker.google.com/issues/216675028 someone from Google acknowledges this and says a fix is in testing.

"never upgrade, never upgrade, never upgrade". I rolled the dice and paid the price. Generally once I have a stable setup I don't touch it. But all the tech companies keep us on a constant upgrade treadmill so that the ground is never stable. Add to that, we are all basically unpaid QA testers because any new release is really an alpha/beta. Now I cannot debug the app in the emulator.

@c4augustus You could relax if you have a backup mechanism (e.g Time Machine on macOS).
I prefer to rarely rollbacks instead of stagnation.

@hannesa2 I am on Windows, but I do have a second Windows computer with the previous version of Android Studio. I am now replacing my new installation with the old one from there. I also have a really old version of Android Studio on another computer running macOS to make sure that the app still works with the older toolset. I don't know why I bother to upgrade when every time that I do results in a work-breaking change.

For the time being, m1 chip users can do the following:

  • Uninstall emulator in android studio by going to sdk tools and uncheck emulator option and then click apply.
  • Download canary Dolphin version Android studio
  • When you will open device manager in the new android studio, it will ask to install emulator. Install it.
  • The emulator installed is of older version which does not have this bug.
  • Now, you can uninstall the canary version of Dolphin Android studio and use Bumblebee stable or continue using Dolphin.

So convenient to install the Dolphin Preview and see it working. I am wondering why is it not fixed in the Bumblebee itself in the first place. And all this while I was wondering what I was doing wrong.

2022; One year later, but same behavior with latest Android Studio (at time of writting, Chipmunk 2021.2.1).

I could pin down the error to be latest "platform-tools" related, further more, only it's "adb.exe" file was the root cause.
I did downgrade "platform-tools", and anyone who does not want to downgrade:
simply killing the adb process will cause Android Studio to restart adb, but this time without here discussed issuse!!

This only happen to me, when I've more the one Android Studio, or any other Intelij product, open

This still happening on my Android Studio: BumbleBee (physical device)
image

I am facing the following issue.
Screenshot 2022-06-09 at 1 27 23 PM

I have tried every possible solution listed on StackOverflow, but it's not working. I have tried the following approaches:

1- Deselect Emulator from SDK tools and reinstall it.
2- Use a new emulator image.
3- Delete emulator instances from the activity monitor.
4- Reinstall the Android Studio.
5- Use previous versions of Android Studio.

I know it's late but i solved by disabling IPv6.
Added this line:
-Djava.net.preferIPv4Addresses=true
to the custom VM options

In the Device Manager tab I clicked the the down arrow beside my device and tried "Cold Boot Now". Seemed to work for me, so I thought I'd see if it helps anyone else. Cheers.

I know it's late but i solved by disabling IPv6. Added this line: -Djava.net.preferIPv4Addresses=true to the custom VM options

Thank you. It works, save my time a lot.

"Tools"-"Troubleshoot device connections"
Follow the giude:
"Rescan devices"-"Enable USB debugging"-"Restart ADB server"-Finish

It helps me a lot, maybe is helpful to you guys.

In the Device Manager tab I clicked the the down arrow beside my device and tried "Cold Boot Now". Seemed to work for me, so I thought I'd see if it helps anyone else. Cheers.

Thanks a lot! This is the only thing that worked to me

We need to run the code on Android 4.3. Due to hardware problems and code problems, my program runs very slowly, so when I encounter this problem, I am very confused. I don’t know whether it is caused by poor hardware or too new programs. of.I am using the fox version of Android studio here
image