Apple M1 - Your CPU does not support VT-x - android

I tried everything and I am running out of ideas to have an Android simulator working on my mac.
I downloaded —again— Android studio from the official website https://developer.android.com/studio/index.html
Android Studio Bumblebee | 2021.1.1 Patch 3
Build #AI-211.7628.21.2111.8309675, built on March 16, 2022
I downloaded "the R API Level 30 image"
I installed "The Zulu OpenJDK" with
brew tap homebrew/cask-versions
brew install --cask zulu11
I know the android-emulator-m1-preview is not required anymore
Edit:
Following #mmBs advice, I changed the path to Gradle
Preferences > Build > Gradle > Gradle JDK > azul-11
...same result.
I can't make the virtual device works on my machine.
I always have this device manager error when I try to launch the simulator.
Question:
How can I have an android simulator working with an Apple M1?

What works for me:
Install Android Studio from the official webpage for M1 processors and then install Android SDK in default location ~/Library/Android/sdk.
Install java using brew - brew install openjdk#11 (android supports java 11, no needs for installing java 17 etc.) and then add it to the path.
Set your android paths in zsh or bash:
# Path to Android SDK
export ANDROID_HOME=/Users/$USER/Library/Android/sdk
export PATH="$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/ndk-bundle:$PATH"
Install the emulator image for arm --> arm64-v8a (from Android Studio's Device Manager).
Done - it should be working. I use M1 processor and the emulator works just fine. You don't need any m1-emulator-preview from github.
Edit: you can check this thread as well: Android Studio/Emulator on macOS with ARM CPU M1

this worked for me!!!
Preferences->Appearance&Behavior->Android SDK->SDK Tools
Check these..see pics

Related

Cannot add additional platforms/build tools in Android Studio

I installed Android Studio Arctic Fox 2020.3.1 on Ubuntu via the Ubuntu Software Center having previously installed the Java and android SDK's using apt from a terminal, following the official installation instructions and I had no reported issues while installing or after. When I ran Android Studio, its seems to have detected the Android SDK location which is installed at:
/usr/lib/android-sdk
but when I tried to add additional platform and tools for android nougat in:
Tools->Android SDK->Android SDK Location
The Android SDK location is:
/usr/lib/android-sdk
Which is correct, but when I click Edit and the SDK Components Setup dialog is loaded, the Android SDK location is again displayed and is also correct, however there's a warning message underneath which states:
<!> An existing Android SDK was detected. The setup wizard will only download missing or outdated SDK components.
When that appears to be merely stating the obvious and doesn't need to be said, so why the warning?. I just ignored it anyway and tried to add some additional plaform support. Prior to that, to test android studio was working after install, I rebuilt an existing hello-world project and the target platform from previous builds was 27.0.1 and as a result of rebuiding that existing project Android Studio appears to have created a hard link from 27.0.1 which it installed to the 'debian' folder, so when I list that location in a terminal I get:
$ls -al /usr/lib/android-sdk/build-tools/
lrwxrwxrwx 1 root root 6 Aug 29 2019 27.0.1 -> debian
drwxr-xr-x 3 root root 4096 Aug 11 00:22 debian
As you can see '27.0.1' is a hard link to the debian folder and by checking the properties of the link I can confirm it was created by Android Studio on 11th August which is the date it was installed:
27.0.1 Properties
Name: 27.0.1
Type: Link to folder (inode/ directory)
Parent folder: /usr/lib/android-sdk/build-tools
Modified Wed 11 Aug 2021 12:22:55 BST
When I attempt to install any additional platforms and tools, Android Studio now complains and cannot continue, it tells me to check the log and when I examined the Idea.log it says:
'build-tools;debian' in inconsistent location '/usr/lib/android-sdk/build-tools/27.0.1' (Expected '/usr/lib/android-sdk/build-tools/debian')
when the expected location exists and there appears to be no such issue, since the Android SDK is exactly where the installer put it and exactly where it should be, I dont know why it thinks there is a problem, where there doesn't appear to be one. However I dont know why Android Studio created the hard link for platform 27.0.1 -> debian when it added that platform to build hello world?
I worked out the solution myself. The solution is:
(Note: you need to ensure your PC is connected to the internet, so Android Studio can download the Android SDK)
Uninstall the Android SDK.
In my case, I installed the Android SDK via apt in a terminal, so I uninstalled using the following commands:
sudo apt-get remove android-sdk
and then
sudo apt-get --purge remove android-sdk
Launch Android Studio and it will automatically start the Android Studio Setup Wizard and issue the pop-message:
Title: Missing Components
Message: No Android SDK found
Follow the wizard to install the SDK.
This time the SDK is installed to your home directory and Android Studio has no issues with the SDK.
To test it all works, I installed the additional build-tools and target platforms for my test app and built and ran it on an AVD and everything works fine.

Cannot install Android Studio on Chrome OS: Error while installing package: package architecture (amd64) does not match system (arm64)

I cant seem to install Android Studio on my Chromebook and I cant find a compatible package on the website. Any way to get it working on this specific Chromebook? (Acer Chromebook Spin 513)
About Chrome OS:
Google Chrome 90.0.4430.218 (Official Build) (32-bit)
Revision 3d6fce300d32b4652aed6bfe358eba932e094ee5-refs/branch-heads/4430#{#1466}
Platform 13816.82.0 (Official Build) stable-channel trogdor
Firmware Version Google_Lazor.13577.102.0
Just install the .DEB file. You also need to make sure you have 3-4 gb enabled for linux. I had the same problem, and it turns out I was not allocating enough storage to actually install android studio.
First, add the Linux terminal. Then install snap or flatpak in the terminal. Then, use snap or flatpak to install Android Studio without errors. Snap and flatpak will find which architecture your computer is and will install the Android Studio designed for the architecture
Snap : https://snapcraft.io/android-studio
Flatpak : https://flathub.org/apps/details/com.google.AndroidStudio

Building app with Cordova using Visual studio

I am using visual studio to develop cordova apps, they seem to run perfectly on ripple emulator but when I select GOOGLE ANDROID EMULATOR then it gives the error as
THIS AVD's CONFIGURATION IS MISSING A KERNEL FILE
and when I use VS EMULATOR 5'' KITKAT(4.4) XXHDPI PHONE then it gives the error as YOU DO NOT HAVE PERMISSION TO MODIFY HYPER-V NETWORK ADAPTER SETTINGS
Can anyone please help?
It seems like you have an incomplete install of the Google Android Emulator and have to install one yourself.
Download Android Studio, open the SDK manager, and install the following components:
latest "Android SDK tools"
latest "Android SDK platform-tools"
latest "Android SDK build-tools"
Android 6.0 API 23 - SDK platform -- to build the latest kind of Android app
Android 5.0.1 API 21 - SDK platform -- to use the emulator successfully
Android 5.0.1 API 21 - ARM EaBI v7a System Image -- the emulator image which you can use on a machine with Hyper V activated
Then, open the AVD manager and create an emulator with the ARM system image.
Finally, go to tools->options->"Tools for Apache Cordova" -> Environmental variable overrides, and link to where your customized Android Studio is installed.

Version of Android studio for Mac OSX 10.7.5

I tried to install the latest version of Android studio on my OS x 10.7.5 but the AVD requires 10.8.5 or higher upto 10.9. It is not possible right now to update OSx, instead we decided to get a working version of android studio.
Which version of Android studio would work on Mac OSX 10.7.5?
There are three options from what I see here :
You install ubuntu (I recommend Linux Mint 17.2 "Rafaela" - Xfce RC (32-bit) as it's lighter on your CPU and RAM) and dual boot. You don't need to update your Mac OS 10.7.5, it will remain intact, but you will boot on linux to develop Android Apps.
There you can install the latest version of Android Studio with no hassle.
Go with the previous Android Development solution : Eclipse IDE Indigo or higher + ADT bundle plugin. Check to see what version of JDK worked on 10.7.5, install it, then install one of the versions of eclipse from Indigo to Mars and then install the above mentioned plugin.
You can try to download and run the first Android Develop Studio Beta that ever appeared on the website (0.8.0), I don't think they ever supported 10.7.5, but you can try.
My suggestion is to try to install linux (point 1) (maybe with the help of a friend), because it's important to have the latest SDK version and the latest updates.
+ It's easier to work with.

Can't deploy basic android app with Android Studio on Windows Vista with JDK 8

I have a Windows Vista Home Premium 32-bit computer. I am running the stable Android Studio 3.2.1 with the JAVA_HOME environment variable correctly set to the stable C:\Program Files\Jaba\jdk1.8.0_191. I had to updated this JDK location in android studio to get this to work. I can't run the latest Java 11 SDK because it only runs on 64-bit computers. So, I have an Android 7.0 Nougat smartphone with developer options enabled. I have tried to compile the My First App from developer.android.com/training/basics/fireball/running-app . But cannot get it deployed neither onto any emulator nor onto my device. I try Run... from Android Studio but even though my device is detected I cannot deploy my app to my smartphone. The driver is installed successfully. Any idea what the problem might be, and whether I can fix it?
Thanks.
You have to download the 32 bit Android Studio versiln and just install it. It will install a compatible JVM for 32 bit.

Categories

Resources