I'm having trouble getting my emulator to work on my m1 mac. Currently, I am waiting on my physical android phone to arrive so I have to use an emulator for the moment. I have looked at the official google repo (https://github.com/google/android-emulator-m1-preview) for the m1 preview and I noticed it said "Support for downloading the M1-based emulator was added to SDK Manager, so it's not necessary to go to the Github releases page to download a standalone .app anymore. In AVD Manager go to the Other Images tab as by default it doesn't show the ARM64 images." However, I can't seem to find which SDK to download in the SDK manager as every time I attempt to cold boot a virtual device it simply returns the error "Could Not Start AVD".
Sorry if this has been asked before. Couldn't seem to find any posts about it.
So it took some time but I figured it out. In the updated Android Studio you have to create a new virtual device for ARM based machines. Once you select your new device and you get to what android release you would like to run, hit the "other" column. Now you have a list of some of the ARM based Virtual Devices.
Here is a link to a post I found that helped:
Android Studio - How Can I Make an AVD With ARM Instead of HAXM?
Android Studio Dolphin, Virtual Device Manager, now includes arm64a-v8a for Tiramisu API level 33, which works well for M1 mac.
Related
First post--be gentle. Can't find any posts on Android Studio 4.0, so I hope this isn't a repeat. I updated Android Studio from 3.6.3 to 4.0 on Windows 10 (1909). Had created a couple of virtual devices in 3.6.3 (a Pixel 2 running API 28 and a Pixel 3 running API 29)--both worked great in AS-3.6.3 and I could develop apps, compile, load, and run them with no problem.
After the update to AS-4.0, the virtual devices no longer appear in the devices box at the top of the GUI--it just says "No Devices". When I open the AVD Manager, I can see them, and I can start them (although when I start them I get a pop-up saying "AVD Manager: Unable to locate adb"), but I can't get any code to download and execute on it. On the Pixel 3 emulator, I also get another pop-up saying "Detected ADB: Could not automatically detect an ADB binary.", and it gives instructions to resolve it, which don't make any difference (jump into extended controls and toggle "Use detected ADB location").
When I try to open a past project and run it, I get the same behavior--no devices found.
I've also tried making new emulators, hoping the new setup would recognize them, but to no avail. Tried starting and restarting AS, as well as the computer, also to no avail. I have Android SDK Build-Tools 30-rc4, the latest Android SDK Command-line Tools, Android Emulator 30.0.12 Android SDK Platform-Tools 30.0.1, and the Intel x86 Emulator Accelerator all installed.
I've Googled and spoken words of fierce power over this for several days now. Any suggestions for how to get AS-4.0 to recognize the emulators? I've resisted uninstalling everything and starting over--was hoping it was just a configuration thing.
Thanks in advance,
Uber
After some more Googling, I found the answer here (I think my constraint of wanting an answer for AS-4.0 specifically kept me from finding it):
Could not automatically detect an ADB binary - Android Studio
I had to redownload the SDK platform-tools zip file and reinstall it. I don't know why the old one got messed up with the migration from AS-3.6.3 to 4.0, but there you go--such is life with complicated software.
As soon as I replaced the old platform-tools directory with the new one, all my old emulators showed up and I was back in business.
Thanks anyway!
Uber
A few hours ago, my Android studio was working very fine. I could write, build and run on my test device (TECNO K7).
I decided to update my Android Studio to 3.5. The whole process went well except that I cannot find my device among the list of devices any longer. I have also tried with multiple devices, I got the same outcome. When I click on the run-button, the app runs on the Pixel 2 emulator. However, I want it to run on my device.
Here's a screenshot of what my menu looks like. Note that the device (TECNO K7) is currently connected:
Is there something I am doing wrong?
UPDATE:
I tried restarting my ADB server and I go the following error:
Unable to locate ADB.
I have also tried re-installing the following tools multiple times, still the same outcome:
Android SDK tools
Android SDK Build-Tools
Android SDK Platform-Tools
PS: For reference, I use Mac OS and it is also important to remember that my Android studio was working perfectly fine before the update.
Solution:
Drivers not installed: If the Android Physical device is not a Google/Nexus product than you have to download the OEM drivers of the particular model.
HAXM not installed properly : Hardware Accelerated Execution Manager must have not installed properly on your computer. Try reinstalling it directly from the options available in your SDK.
No proper Path : Sometimes though the files are available in the local system, The Android Studio is not guided with the accurate path name to reach the file.
Hope this will be useful to you.
After spending hours on this I found that the Studio update had un-assigned an SDK for my project.
Selecting File -> Project Structure, then selecting an SDK under 'Project SDK' immediately displayed the 'allow debug on this device' dialog on my phone, then within a few seconds after accepting it, the device showed up in the device list.
Go to:
File > Invalidate caches/Restart > Invalidate and Restart
That should work.
Before going to bellow steps make sure
Your "Google USB Driver" package is installed ("Tools" -> "SDK Manager" -> Check "Google USB Driver" -> "Apply" -> "Ok").
If you are trying to access with emulator then check "Intel x86 Emulator Accelarator(HAXM installer)" is instaled. ("Tools" -> "SDK Manager" -> Check "Intel x86 Emulator Accelarator(HAXM installer)"" -> "Apply" -> "Ok")
Go to Tools.
Then go to SDK Manager.
Open SDK tools.
Uncheck "Android SDK Platform-Tools" (On my case it was checked).
press apply then ok.
Again goto Tools.
Then goto SDK Manager.
Open SDK tools.
check "Android SDK Platform-Tools"
Restart Android Studio :)
Hope this will help somebody like me.
This option is definitely not the most optimal. I eventually deduced that the problem was with my HAXM and simply re-installing this would have solved the problem. If you face, this exact problem, simple re-install the HAXM in your SDK.
I hope this helps someone out there.
I'm a new Android Studio user, but I've already done something in the last few days.
I have only a problem with the emulator. I tried to run my code with a normal Virtual Device, but every time I always got the same error:
Emulator: emulator: ERROR: x86 emulation currently requires hardware acceleration!
Emulator: Process finished with exit code 1
I tried to find a solution in the internet, and I found that the problem was my computer (it is an AMD) and I had to download the "armeabi" version when I created a new virtual device.
It worked (I have no more errors), but my emulator is always black and I cannot see anything. I was forced to use Debug USB on my personal phone, to plug in and use it (and it works) but I'd like to solve the problem with the Android Studio emulator. My Android Studio version is 3.3.1, the latest.
Obviously when I have a preview clicking on the file "activity_main.xml" I can see the right output.
Normally I use Nexus 5 and I've tried with Marshmallow and Nougat.
Increase your VM Heap & try it again.
Tools -> Android -> AVD Manager.
Select a virtual device and click on its pencil icon (edit)
Click on Show Advanced Settings.
Under "Memory and Storage" change "VM Heap"
If above is not helpful, Please Check "Wipe user data" in the Launch Option
Go to Android Virtual Device Manager->Select your device->Start->Check "Wipe user data"->Launch
make sure that Intel x86 Emulator Accelerator is active
I am trying to run my app on canary build of the android emulator from android studio on AMD processor but I am getting the following error
1:47 PM Emulator: [2440]:INFO:android/android-emu/android/verified-
boot/load_config.cpp:236:Verified boot params were not found.
1:47 PM Emulator: **
1:47 PM Emulator: ERROR:/usr/local/google/buildbot/src/android/emu-master-
dev/external/qemu/fpu/softfloat.c:486:round_canonical: code should not be
reached
1:47 PM Emulator: Process finished with exit code 3
I got to know about the canary build of the android emulator for AMD processor from here. My virtual device' CPU/ABI is armeabi-v7a. I searched for what the 'exit code 3' for the emulator mean but I didn't get any solution.
Can someone help me please!
I got the android emulator working today.
I have done the instalation process for canary build of android studio from the beginning:
1. Enabled "Hyper-V" and "Windows Hypervisor Platform" in "Turn Windows features on or off" settings of Windows. This has been explained in here.
2. Downloaded the latest Canary build of Android studio from here.
3. After downloading the zip file I followed the guidelines in here under "Install alongside your stable version" heading. The guide lines are:
a. Unpack the ZIP file.
b. Rename the resulting folder to something unique like "Android Studio Preview."
c. Move it to a permanent location, such as next to your existing Android Studio install in C:\Program Files\Android.
d. Inside C:\Program Files\Android\Android Studio Preview\bin\, launch studio64.exe (or if you're on a 32-bit machine, launch studio.exe).
4. After launching studio64.exe I got a pop-up message to update Android emulator. After the update I created a new virtual device with an image of x86 with android 9.0. I started the android emulator to test my app. Though I got the
Verified boot params were not found
popup error message initially, the emulator started functioning well.
I am a very new Android developer and was until today having the same issue as yourself. Here is how I got it to work (Please note I am also on an AMD system).
Make sure you have enabled Hyper-V and Windows Hypervisor Platform. If you type "turn windows features on" in your run bar you should be able to locate it. Also enable virtualisation in the Bios. Mine comes under "SVD".
(Please note after this step I was still experiencing the problem but this is a pre-requisite).
Delete all devices from the AVD manager.
Install a new x86 device from the AVD manager. What I did here was select a version down from the one I was previously getting issues on so Oreo from Pie. When it asks to confirm if you want to wipe the user data please confirm positive.
Once setup, run the device from the AVD manager. It may ask you if you wish to enable Instant Run. I elected to disable this. (I had enabled it when I first was trying to run a device).
You will still receive the 1st error regarding no boot parameters but the emulated environment should load. You can now run the APP and it should install the APK. Previously due to the device not coming online properly, the APK would not install. I can also now setup a device on Pie without experiencing the issue so I think it may have been the wiping of the previous data that helped.
I wish I could tell you WHY this worked for certain and previously it would not work, sadly I cannot but hopefully this will get you working.
Yesterday, I installed Android Studio's latest version on Ubuntu. Everything ran fine, until I ran the "Hello World!" program. It asked me to create a virtual device. While creating the device, it shows me an error that the AVD manager cannot find a system image. This makes no sense since I have already installed the latest SDK (API level 25, Android 7.1.1). I downloaded the system image from the AVD manager itself, but to no avail.
Can someone help me sort the damn thing out? I switched from Windows to Linux due to the plethora of problems with Android Studio on Windows. But the thing's bugging once again. Here is a screen shot: