Android studio build fails with apple m1 chip - android-studio

I have new MacBook Pro with the m1 chip, i downloaded the Android studio for apple silicon chip version.
All works fine until the Build process, while build i get error
Cause: error=86, Bad CPU type in executable
i spent half day to fix it but without any success, only after i installed Rosetta it successfully finished the build, the question is why i need Rosetta if i install the apple silicon version of Android Studio?
I tried to change gradle plugin version and sdk's, but not helped

Related

Android Studio: Virtual machine acceleration is out-of-date

Android Studio shows "Virtual machine acceleration driver is out-of-date", even though I just installed the latest version of haxm from github.
Does anyone know how to fix that?
I tried to install it with Android Studio, but it keeps getting errors.

Does anyone know how to update intel HAXM from version 7.6.5 to 7.8.0 in Android Studio Electric Eel 2022.1.1 Patch 1 (Windows 10)

Does anyone know how to force update Intel HAXM in the latest Android Studio for Windows as this version of Android Studio only seems to install an outdated version?
I have tried adding a repositories.cfg file linking to the latest HAXM file update in github but it does not pickup at all. I have used ChatGPT (not suppose to mention here) to look for solutions but nothing works. I want for the emulators to work smoothly in AVDManager without any lag or the GPU Driver Issue.

Android Studio & Big Sur emulator crash on start HVF error?

I have a fresh Android Studio installation (4.1.3) and am having a really hard time getting any emulator to run.
I started off with Android Emulator 30.5.4. This alone did not work, most of the time qemu would lock up on launch (no window, just a frozen icon in the dock). Next I installed Intel x86 Emulator Accelerator (HAXM installer) 7.6.5. This would result in the emulator crashing every time I tried to launch it from the manager.
I toggled graphics from Automatic to both Hardware and Software... yielding the same results.
I then tried what this post suggested: Emulator not starting after updating to Android Studio. Uninstalled HAXM 7.6.5, installed 7.6.6 manually from https://github.com/intel/haxm/releases. Again hit another roadblock.
I have also tried some older build tools (31.0.0), various SDK platforms (Oreo, Nougat, Q), toggling advancedFeatures.ini (HVF, HAXM).
Any suggestion would be greatly appreciated. Would really love to get an emulator running as I don't have a hardware device.
~/.android/avd/Nexus_6P_API_25.avd ยป ~/Library/Android/sdk/emulator/emulator -avd Nexus_6P_API_25
emulator: Android emulator version 30.5.4.0 (build_id 7243153) (CL:N/A)
handleCpuAcceleration: feature check for hvf
cannot add library ~/Library/Android/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libvulkan.dylib: failed
HVF error: HV_ERROR
qemu-system-i386: failed to initialize HVF: Invalid argument
HAX is working and emulator runs in fast virt mode.
qemu-system-i386: Back to HAX accelerator
added library ~/Library/Android/sdk/emulator/lib64/vulkan/libvulkan.dylib
cannot add library ~/Library/Android/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libMoltenVK.dylib: failed
added library ~/Library/Android/sdk/emulator/lib64/vulkan/libMoltenVK.dylib
emulator: INFO: GrpcServices.cpp:301: Started GRPC server at 127.0.0.1:8554, security: Local
This ended up being a duplicate. A workaround is here: Android Emulator 30.4.5 not working on MacOS
macOS 11.3 seems to be the common thread. Side note that was interesting: when I generated my crash reports to send, the GPU would render as UNKNOWN. This is on a 2018 MBP i9 + AMD 560X

Android AVD run fails and HAXM install fails after SDK tools update

I just updated my android SDK tools to 26.1.1 as it was showing "Updates available", after that my AVD couldn't start, it gave following HAXM related error, although the HAXM was already installed and was working fine before the SDK tools update.
So I uninstalled the HAXM and tried to install it again, but the installation failed giving the following error :
Then I installed the HAXM separately, after downloading the latest ver from git repo (https://github.com/intel/haxm/releases/tag/v7.5.4)
It got installed properly, but still the AVD is failing with same error.
Following the current state of my SDK Tools :
I am working on Win 10 Pro, x86_64, 4GB RAM, Core i7-3517U
Problem solved, you need to go to SDK manager and update Android Emulator to version 29.3.2
then try to install en SDK manager Intel x86 Emulator Accelerator (HAXM installer)
and thats it.
all working fine again.
Android emulator

Android device recognized by adb but not recognized by Chrome development tools

I have an Android device recognized by adb devices but not recognized by chrome development tools (with or without discover USB devices checked).
My machine development is a Mac and I have
installed Android Studio 3.1
Installed SDK platforms Android 8.0 and 8.1
Installed SDK Tools: Android SDK Build-Tools 28 rc-2, Android emulator, Android SDK platform-tools, Android SDK tools, Intel x86 emulator, Android support Repository and Google repository
If disconnect and reconnect the cable, or if I switch on/off the USB debugging on my device makes no difference.
ADB kill-server / start-server don't produce any reaction in Chrome.
Apparently adb is working properly
I've already changed android development environment, from android studio to brew cask version (android-sdk, android-ndk, android-platform-tools) and vice-versa with no success (similar results).
I have reinstalled Chrome
Currently I have android studio and in my ~/bash_profile I have set:
export ANDROID_HOME=/Users/${USER}/Library/Android/sdk
#export ANDROID_SDK_HOME=/Users/${USER}/Library/Android/sdk
#export ANDROID_SDK_ROOT=/Users/${USER}/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator:$ANDROID_$
export ANDROID_ADB_SERVER_PORT=5038
This problem started a coupled of days ago. Previously worked fine for months. Not sure what led to the problem, but I made some trials with ionic dev app (not sure on any cause-effect) and some time after my development environment started with problems.
My problem is I cannot have remote debug with Chrome. I can deploy my ionic application into my connected mobile and run it, but not debug the development
Debugging with emulator is not efficient in my case since I use physical components such as scanning and photos
Any help help is more than welcome. I've spent hours with this ...

Resources