When I first start the emulator in Android Studio I get an information message,
guest hasn't come online in 7 seconds retrying
I am curious as to how to stop this because while it is on my screen for about 40 seconds I cannot do anything in the emulator.
Actually 'Cold Boot Now' may work in this situation
I had the same problem. Selecting Cold Boot Now in AVD manager solves the problem.
But I have to open AVD manager each time when I want to launch Emulator and I just want to click on Run app button and select device, without opening AVD manager.
To solve this: open AVD manager -> Edit device -> Show Advanced Settings -> Boot option -> select Cold Boot instead of Quick boot.
tools->Android->AVD Manager
Choose the device then Cold Boot Now
maybe it's bug from intel haxm 6.2.1, because after i update i got same problem.
I solved by recreate emulator and testing again
I managed to solve this issue by updating the .ini file manually. (I was not able to find a corresponding setting in the GUI.)
The location of the .ini file, relative to your home directory, is:
~/.android/avd/MyDevice.avd/config.ini
where MyDevice refers to the configured device name.
Depending on your operating system, you may find your home directory according https://en.wikipedia.org/wiki/Home_directory.
Change the entry within config.ini from no to yes:
fastboot.forceColdBoot=yes
I specified AVD memory 2048 Mbyte instead of 1536 Mbyte. Things
started to work again. (I'm developing on macbook.)
I tried "Kuldeep Chandel" solution which is to duplicate AVD and my app runs again too. Because of that I specified RAM again as 1536
Mbyte. Guess what... It worked...
I think AVD confuses to handle things and we need to duplicate the current AVD, and use it instead of the problematic one.
In "Your Virual Device" - Click on Duplicate OR Duplicate your Device. It will work like Charm.
I faced this issue on using Android API 28 emulator with Android Studio 3.0.1. Android API 28 requires Studio 3.1 and above. Once I updated Studio to 3.1.4 and Android Emulator to the latest version, it worked.
Seting default settings for problem device from Android Device Manager resolved issue for me.
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 recently upgraded Android Studio to 2.0 (Windows) which broke the emulator.
The symptom is that the emulator starts a (single thread) process that takes about 100% of its CPU. Nothing shows on the screen.
Of course, this worked like a charm before the update.
Few things I tried:
Used an AVD created before and after the update
Increased AVD memory to 1G
Delete / Install Android Studio
Used different CPU Architecture (Arm & x86)
Used different versions of API (21 & 23)
I had the same problem I had to reinstall android studio all over again, After that open your SDK monitor press on launch stand alone SDK manager, There scroll down and check if the emulator is installed properly if not install it.
I hope this answer helped you since that's what I did and it works.
A temporary solution:
Go into the AVD Manager, select the Virtual device, and click "Edit"
Find "Emulated Performance" -> Graphics, and switch that from auto (or hardware) to Software.
It won't have quite the performance, but this worked for me. Seems to be that Android Studio 2.0 doesn't play well with certain graphics cards or something.
When I select any emulator, I'm getting this weird old red phone. The screen is super small and I can't see anything. I've tried searching, but it looks like no one else has had this problem. Does anyone recognize it? My emulators did work fine, but I had to uninstall and reinstall Android Studio because it broke. After reinstalling, this is what's happening :/
Open AVD Manager in Android studio
Select the target emulator and click edit
Click Show Advanced Setting
In the Boot Option section select Cold Boot
Click on Finish
This solved my problem
Go to Tools>Android>AVD Manager and remove all device than add again. Hopefully this will fix your problem. I had exact issue when I moved my sdk folder.
You can try genymotion as your emulator. Its faster and more stable than android studio's emulator. Search on Google for more information.
I had the exact same problem.
I removed all existing devices from my AVD manager and re-installed one which is required. The problem went away.