google / android-emulator-m1-preview

Apache License 2.0
1.83k stars 161 forks source link

AVD Emulator not working anymore on Bumblebee #76

Open jeanlst opened 2 years ago

jeanlst commented 2 years ago

I just updated Android Studio to Bumblebee and I really REGRET it. Emulator doesn't work anymore

Whenever I launch it they just get stuck in this

image

jeanlst commented 2 years ago

Running from the console works fine...

Sbenari commented 2 years ago

I have the same problem. I'm working with macOS version of Bumblebee. So far I Invalidated the cache, restored the layout, and removed the emulators' folder from the SDK folder, but nothing solved the problem yet. I've managed to launch the emulators from the command line but that is just tedios.

jeanlst commented 2 years ago

Ok it started working for me, I just uncheked this option @Sbenari no idea what is happening tbh

image

edgarmiro commented 2 years ago

When I run it from the command line I get this:


~ emulator -avd Pixel_3a_API_32_arm64-v8a
[8676713984]:ERROR:android/android-emu/android/qt/qt_setup.cpp:28:Qt library not found at ../emulator/lib64/qt/lib
Could not launch '/Users/edmiro/../emulator/qemu/darwin-x86_64/qemu-system-aarch64': No such file or directory
Sbenari commented 2 years ago

Do this ./emulator -avd Pixel_3a_API_32_arm64-v8a

On Thu, Jan 27, 2022 at 2:56 PM Edgar Miró @.***> wrote:

When I run it from the command line I get this:

~ emulator -avd Pixel_3a_API_32_arm64-v8a [8676713984]:ERROR:android/android-emu/android/qt/qt_setup.cpp:28:Qt library not found at ../emulator/lib64/qt/lib Could not launch '/Users/edmiro/../emulator/qemu/darwin-x86_64/qemu-system-aarch64': No such file or directory

— Reply to this email directly, view it on GitHub https://github.com/google/android-emulator-m1-preview/issues/76#issuecomment-1023586763, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARSBA4K2IS633EZF3JQGTJLUYGPNNANCNFSM5M6UPYLA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

-- Steve Ben-Ari www.extrapix.com www.amazon.com/shops/EXTRApix http://stores.ebay.com/Surplus-Plus-1-- Honda Shadow 2005 Ice

Sbenari commented 2 years ago

@jeanlst unfortunately it didn't work for me. the "Launch in tool window" was already checked. it didn't work either checked or unchecked.

austinduran commented 2 years ago

@jeanlst Go to your SDK tools and Uncheck/Uninstall the current Android Emulator tool. Then try and launch your created virtual device. This will launch the Component Installer, prompting you to install the Android Emulator once again. Click Ok. Wait for download, and finish. Launch the emulator without being prompted by the component installer this time. Worked like a charm after I had tried and failed with everything else.

edgarmiro commented 2 years ago

Do this ./emulator -avd Pixel_3a_API_32_arm64-v8a On Thu, Jan 27, 2022 at 2:56 PM Edgar Miró @.> wrote: When I run it from the command line I get this: ~ emulator -avd Pixel_3a_API_32_arm64-v8a [8676713984]:ERROR:android/android-emu/android/qt/qt_setup.cpp:28:Qt library not found at ../emulator/lib64/qt/lib Could not launch '/Users/edmiro/../emulator/qemu/darwin-x86_64/qemu-system-aarch64': No such file or directory — Reply to this email directly, view it on GitHub <#76 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARSBA4K2IS633EZF3JQGTJLUYGPNNANCNFSM5M6UPYLA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.> -- Steve Ben-Ari www.extrapix.com www.amazon.com/shops/EXTRApix http://stores.ebay.com/Surplus-Plus-1-- Honda Shadow 2005 Ice

It doesn't work. Also, I already have the adb in the PATH environment variable.

xrad commented 2 years ago

Same issue, M1 Max. It did work and started failing with the emulator 31.2.6 update. Launching in its own window works.

sibylantoninobajeli commented 2 years ago

I confirm that launching the emulator on its own windows is working a charm.

kunalyelne commented 2 years ago

Unchecking the launch in a tool window works for m1. Was not expecting this bug from bumblebee 🥲. Thanks for the help @jeanlst

PS. If you tried running the emulator with the "launch in a tool window" as checked. Make sure you quit the instances of emulators from Activity Monitor. I had 5 running parallelly and the performance dropped like hell.

Sbenari commented 2 years ago

non of the fixes above worked for me. I have MacBook Pro 13" 2020 with Quad-Core i5. very disappointed.

stefalda commented 2 years ago

I had to delete the device multiple times... than I restarted Android Studio with the tool window option unchecked and in the end it worked... Mac M1 Max

lijobtech commented 2 years ago

To overcome issue

  1. Uncheck "Launch in a Tool window" under emulator in preferences section
  2. Restart the OS to take effect
  3. Goto Android Studio and run your preferred device

By the way, I am using Mac M1 pro with Apple silicon chip - macOs 12.1 and Android Studio Bumblebee 2021.1.1

physxP commented 2 years ago

If you want to run the emulator in tool window one bypass that i found is to launch the emulator then from activity monitor quit the emulator process. A window appears asking if you want to save state. Close that window and the emulator will show up in tool window. The downside is that you have to force quit emulator from activity monitor when you are done using it and cpu usage is pretty high compared to opening the emulator directly. Maybe this can help in diagnosing the actual issue.

hyun97 commented 2 years ago

The same problem has occurred to me. The Android Studio Log causes the following errors.

2022-01-31 22:02:58,660 [2659455]   INFO - manager.EmulatorProcessHandler - Emulator: /Users/hyun/Library/Android/sdk/emulator/emulator -netdelay none -netspeed full -no-snapstorage -avd Pixel_3_API_28 -qt-hide-window -grpc-use-token -idle-grpc-timeout 300
2022-01-31 22:02:58,952 [2659747]   INFO - manager.EmulatorProcessHandler - Emulator: WARNING | cannot add library /Users/hyun/Library/Android/sdk/emulator/qemu/darwin-aarch64/lib64/vulkan/libvulkan.dylib: failed
2022-01-31 22:02:58,955 [2659750]   INFO - manager.EmulatorProcessHandler - Emulator: INFO    | Warning: QMetaObject::connectSlotsByName: No matching signal for on_new_posture_requested(int) ((null):0, (null))
2022-01-31 22:02:58,955 [2659750]   INFO - manager.EmulatorProcessHandler - Emulator:
2022-01-31 22:02:58,955 [2659750]   INFO - manager.EmulatorProcessHandler - Emulator: INFO    | Warning: QMetaObject::connectSlotsByName: No matching signal for on_dismiss_posture_selection_dialog() ((null):0, (null))
2022-01-31 22:02:58,955 [2659750]   INFO - manager.EmulatorProcessHandler - Emulator:
2022-01-31 22:02:58,955 [2659750]   INFO - manager.EmulatorProcessHandler - Emulator: INFO    | Warning: QMetaObject::connectSlotsByName: No matching signal for on_new_resizable_requested(PresetEmulatorSizeType) ((null):0, (null))
2022-01-31 22:02:58,955 [2659750]   INFO - manager.EmulatorProcessHandler - Emulator:
2022-01-31 22:02:58,955 [2659750]   INFO - manager.EmulatorProcessHandler - Emulator: INFO    | Warning: QMetaObject::connectSlotsByName: No matching signal for on_dismiss_resizable_dialog() ((null):0, (null))
2022-01-31 22:02:58,955 [2659750]   INFO - manager.EmulatorProcessHandler - Emulator:
2022-01-31 22:02:58,955 [2659750]   INFO - manager.EmulatorProcessHandler - Emulator: INFO    | configAndStartRenderer: setting vsync to 60 hz
2022-01-31 22:02:58,955 [2659750]   INFO - manager.EmulatorProcessHandler - Emulator: INFO    | added library /Users/hyun/Library/Android/sdk/emulator/lib64/vulkan/libvulkan.dylib
2022-01-31 22:02:59,023 [2659818]   INFO - b.PhysicalDeviceChangeListener - emulator-5554 connected
2022-01-31 22:02:59,023 [2659818]   INFO - mpl.AdbDeviceFileSystemService - Device connected: emulator-5554
2022-01-31 22:02:59,029 [2659824]   INFO - manager.EmulatorProcessHandler - Emulator: INFO    | Started GRPC server at 127.0.0.1:8554, security: Local+token
2022-01-31 22:02:59,029 [2659824]   INFO - manager.EmulatorProcessHandler - Emulator: INFO    | Advertising in: /Users/hyun/Library/Caches/TemporaryItems/avd/running/pid_31104.ini
2022-01-31 22:02:59,679 [2660474]   WARN - ea.emulator.EmulatorController - android.emulation.control.EmulatorController/getDisplayConfigurations call failed - FAILED_PRECONDITION: The multi-display feature is not available
2022-01-31 22:04:59,030 [2779825]   WARN - n.process.BaseOSProcessHandler - Process hasn't generated any output for a long time.
If it's a long-running mostly idle daemon process, consider overriding OSProcessHandler#readerOptions with 'BaseOutputReader.Options.forMostlySilentProcess()' to reduce CPU usage.
Command line: /Users/hyun/Library/Android/sdk/emulator/emulator -netdelay none -netspeed full -no-snapstorage -avd Pixel_3_API_28 -qt-hide-window -grpc-use-token -idle-grpc-timeout 300
java.lang.Throwable: Process creation:
    at com.intellij.execution.process.BaseOSProcessHandler.<init>(BaseOSProcessHandler.java:33)
    at com.android.tools.idea.avdmanager.EmulatorProcessHandler.<init>(EmulatorProcessHandler.java:36)
    at com.android.tools.idea.avdmanager.EmulatorRunner.start(EmulatorRunner.java:66)
    at com.android.tools.idea.avdmanager.AvdManagerConnection.continueToStartAvd(AvdManagerConnection.java:572)
    at com.android.tools.idea.avdmanager.AvdManagerConnection.continueToStartAvdIfAccelerationErrorIsNotBlocking(AvdManagerConnection.java:507)
    at com.android.tools.idea.avdmanager.AvdManagerConnection.lambda$startAvd$4(AvdManagerConnection.java:497)
    at com.google.common.util.concurrent.AbstractTransformFuture$AsyncTransformFuture.doTransform(AbstractTransformFuture.java:213)
    at com.google.common.util.concurrent.AbstractTransformFuture$AsyncTransformFuture.doTransform(AbstractTransformFuture.java:202)
    at com.google.common.util.concurrent.AbstractTransformFuture.run(AbstractTransformFuture.java:118)
    at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:30)
    at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1213)
    at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:983)
    at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:746)
    at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.afterRanInterruptibly(TrustedListenableFutureTask.java:131)
    at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:133)
    at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
    at java.base/java.lang.Thread.run(Thread.java:829)
2022-01-31 22:05:03,834 [2784629]   INFO - manager.EmulatorProcessHandler - Emulator: ERROR   | detected a hanging thread 'QEMU2 main loop'. No response for 105077 ms
2022-01-31 22:05:03,834 [2784629]   INFO - manager.EmulatorProcessHandler - Emulator: ERROR   | detected a hanging thread 'QEMU2 CPU0 thread'. No response for 105078 ms
2022-01-31 22:06:48,900 [2889695]   INFO - manager.EmulatorProcessHandler - Emulator: ERROR   | detected a hanging thread 'QEMU2 main loop'. No response for 105069 ms
2022-01-31 22:06:48,900 [2889695]   INFO - manager.EmulatorProcessHandler - Emulator: ERROR   | detected a hanging thread 'QEMU2 CPU0 thread'. No response for 105069 ms
2022-01-31 22:06:53,906 [2894701]   INFO - manager.EmulatorProcessHandler - Emulator: ERROR   | detected a hanging thread 'QEMU2 main loop'. No response for 110073 ms
2022-01-31 22:06:53,907 [2894702]   INFO - manager.EmulatorProcessHandler - Emulator: ERROR   | detected a hanging thread 'QEMU2 CPU0 thread'. No response for 110073 ms
2022-01-31 22:06:58,907 [2899702]   INFO - manager.EmulatorProcessHandler - Emulator: ERROR   | detected a hanging thread 'QEMU2 main loop'. No response for 115076 ms
2022-01-31 22:06:58,907 [2899702]   INFO - manager.EmulatorProcessHandler - Emulator: ERROR   | detected a hanging thread 'QEMU2 CPU0 thread'. No response for 115076 ms
2022-01-31 22:07:03,910 [2904705]   INFO - manager.EmulatorProcessHandler - Emulator: ERROR   | detected a hanging thread 'QEMU2 main loop'. No response for 120081 ms
2022-01-31 22:07:03,911 [2904706]   INFO - manager.EmulatorProcessHandler - Emulator: ERROR   | detected a hanging thread 'QEMU2 CPU0 thread'. No response for 120081 ms
2022-01-31 22:07:08,915 [2909710]   INFO - manager.EmulatorProcessHandler - Emulator: ERROR   | detected a hanging thread 'QEMU2 main loop'. No response for 125082 ms
2022-01-31 22:07:08,915 [2909710]   INFO - manager.EmulatorProcessHandler - Emulator: ERROR   | detected a hanging thread 'QEMU2 CPU0 thread'. No response for 125082 ms
2022-01-31 22:07:13,919 [2914714]   INFO - manager.EmulatorProcessHandler - Emulator: ERROR   | detected a hanging thread 'QEMU2 main loop'. No response for 130085 ms
2022-01-31 22:07:13,919 [2914714]   INFO - manager.EmulatorProcessHandler - Emulator: ERROR   | detected a hanging thread 'QEMU2 CPU0 thread'. No response for 130086 ms
Sbenari commented 2 years ago

@stefalda, when you say "delete the device multiple times", what do you mean by that? so far non of the above fixes worked for me Device Manager won't open, I can only use the command line to launch devices or use the Device selector. but I can't open the Device Manager to manage my devices. and I have checked and unchecked "launch in the window" and reboot many times. Nada!

Sbenari commented 2 years ago

I have found though that the Virtual Device Manager does open from the "Welcome to Android Studio" window Screen Shot 2022-01-31 at 10 59 20 AM Screen Shot 2022-01-31 at 10 58 15 AM .

stefalda commented 2 years ago

@Sbenari I couldn't delete from the interface because it said that the emulator was in use, so I chose to "show in finder", close Android Studio and delete the folder...

inemtsev commented 2 years ago

If you get emulator is in use error, go to: /Users//.android/avd/ then open the folder of the emulator you use and run: *rm .lock**

After deleting the device and unchecking unchecking the launch in tool window everything worked fine on MacOS M1 Pro

sonusourav commented 2 years ago

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

Sbenari commented 2 years ago

@stefalda @edgarmiro @sibylantoninobajeli @jeanlst @inemtsev

I ended up reverting back to Arctic Fox and all sorts of problems disappeared including AVD Manager not working, COCOAPODS errors, and various other problems. Bumblebee is just not a stable release yet!

c4augustus commented 2 years ago

Under Windows if you undock the emulator into a separate window, as it used to work, it is frozen to the middle of the screen. It cannot be moved or resized, not by the mouse, Alt-space M, or any of the Windows controls. Nice improvement.

tenthapp commented 2 years ago

In the latest update, this has been fixed. 31.2.7

ghost commented 2 years ago

I confirm, the update for emulator version 31.2.7 works like a charm.

c4augustus commented 2 years ago

Standalone window for the emulator is still locked to the center of the screen.

ghost commented 2 years ago

Not working on emulator API version 32.

prema6 commented 2 years ago

this solution works - https://stackoverflow.com/questions/70864465/why-device-manager-dont-open/70866555

Navneetsinh53 commented 2 years ago

Unchecking the launch in a tool window works for me.

jayveedee commented 2 years ago

I had a similar issue with the emulator as well. In my case it works perfectly fine using Pixel 5 API 30in the tool window but as soon as I go to Pixel 4 and API 24 or Nexus API 21, they open for awhile and disappear shortly after. I can see that the process is running in the background and even the dropdown menu shows it as online, it's just not in the tool menu. Detaching the emulator from the tool window solved the issue for me as well.

SyedShehrozSohail commented 2 years ago

To overcome issue

  1. Uncheck "Launch in a Tool window" under emulator in preferences section
  2. Restart the OS to take effect
  3. Goto Android Studio and run your preferred device

By the way, I am using Mac M1 pro with Apple silicon chip - macOs 12.1 and Android Studio Bumblebee 2021.1.1

You literally saved my 3 days. I did everything. Tried different solutions. Even uninstalled android, gradle and android studio. I don't think, I left any solution. Finally restarting worked for me :D

venusiza commented 2 years ago

Installing new emulator solved my issue

https://developer.android.com/studio/emulator_archive