Issue
Just got a new M1 Mac Mini and I have been having trouble running my Android projects.
I'm using Android Studio (Bumblebee), JDK 11 (tried 17 as well), and Gradle 7.3.
When I try to run the project from AS, it builds fine and then gets stuck on "Waiting for target device to come online" and eventually times out.
If I try to run the emulator again I get a message that the device is already running, including a path to a lock file.
However, I've found that if I run the emulator manually from the CLI, the emulator does open, at which point I can get AS to run the app on said emulator. So the problem is apparently just that AS can't open the AVD.
Command line output when running emulator via adelphia$ emulator -avd Pixel_3a_API_32_arm64-v8a
:
adelphia$ emulator -avd Pixel_3a_API_32_arm64-v8a
INFO | Android emulator version 31.2.6.0 (build_id 8100890) (CL:N/A)
WARNING | unexpected system image feature string, emulator might not function correctly, please try updating the emulator.
INFO | Warning: QMetaObject::connectSlotsByName: No matching signal for on_new_posture_requested(int) ((null):0, (null))
INFO | Warning: QMetaObject::connectSlotsByName: No matching signal for on_dismiss_posture_selection_dialog() ((null):0, (null))
INFO | Warning: QMetaObject::connectSlotsByName: No matching signal for on_new_resizable_requested(PresetEmulatorSizeType) ((null):0, (null))
INFO | Warning: QMetaObject::connectSlotsByName: No matching signal for on_dismiss_resizable_dialog() ((null):0, (null))
WARNING | cannot add library /Users/adelphia/Library/Android/sdk/emulator/qemu/darwin-aarch64/lib64/vulkan/libvulkan.dylib: failed
INFO | added library /Users/adelphia/Library/Android/sdk/emulator/lib64/vulkan/libvulkan.dylib
INFO | configAndStartRenderer: setting vsync to 60 hz
INFO | Sending adb public key [QAAAAG8XVkhVwEAAQA....= adelphia@unknown]
INFO | Rootcanal has been activated.
Could not initialize record - Unknown Audiodevice
Could not initialize record - Unknown Audiodevice
Failed to create voice `goldfish_audio_in'
qemu-system-aarch64: warning: opening audio input failed
INFO | Started GRPC server at 127.0.0.1:8556, security: Local
INFO | Advertising in: /Users/adelphia/Library/Caches/TemporaryItems/avd/running/pid_1469.ini
Could not initialize record - Unknown Audiodevice
Could not initialize record - Unknown Audiodevice
Failed to create voice `adc'
Could not initialize record - Unknown Audiodevice
Could not initialize record - Unknown Audiodevice
Failed to create voice `adc'
If it's relevant, here's my .bash_profile
(changed back to bash)
export PATH="/opt/homebrew/bin:$PATH"
export PATH="/opt/homebrew/sbin:$PATH"
export PATH="/Users/adelphia/Scripts:$PATH"
export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh
export ANDROID_HOME=~/Library/Android/sdk
export ANDROID_SDK_ROOT=~/Library/Android/sdk
export PATH=${PATH}:${ANDROID_HOME}/emulator
export PATH=${PATH}:${ANDROID_HOME}/tools
export PATH=${PATH}:${ANDROID_HOME}/platform-tools
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.14.jdk/Contents/Home
So, how do I get AS to be able to open the emulator from the GUI?
Solution
You have to update tools for AVD in the IDE. Android Emulator is 31.2.6
Answered By - Alexander
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.