Android Studio Emulator Frozen and Wrong Phone - android-studio

Using Android Studio Arctic Fox | 2020.3.1 Patch 3 on Windows 10, using Android Virtual Device.
When attempting to run any app, it shows a phone screen that only displays the google logo animation, the static google logo, or the home screen. None of these react to any of my inputs or interactions. For some reason, the phone is also not the one I selected for emulation. It doesn't look like either the Galaxy Nexus API 29 or Pixel 2 API 30, for example.
No errors appear in Android Studio, though it does say "Waiting for target devices to come online" with the progress bar not moving.
I've tried multiple different emulators, different projects with different settings, I restarted, etc. but nothing seems to work.

The error is actually Cold Boot: Snapshot doesn't exist, which was answered here. To fix it go to AVD manager -> edit this AVD -> Show Advanced Settings -> Emulated Performance -> Boot Option -> Quick Boot.
This error message didn't show up until I reinstalled Android Studio, which is why I missed it at first.

Related

How can I find out why Android Auto in developer mode won't connect to the "Desktop Head Unit"?

I am attempting to get car_app_library hello world example to run through android auto to the DHU.
I have two different workstations with Android Studio and the DHU 2.0Beta. I have two different Android Devices, a Galaxy S9+ and a Galaxy Tab S6.
With any combination, with ADB and DHU running, locally on the devices at best, I can get a full white screen to flash which disappears, and no connection from there.
On the device, I have enabled unknown sources in Android Auto, and I have started "Head Unit Server"
On the workstation, DHU simply indicates at all times, "Waiting for phone...".
Studio "Run" indicates "success, operation succeeded" but nothing happens.
I finally got this working after two days. I could tell when it was not working that 1/5 times I'd see a flashed screen prompting for bluetooth and to continue, but I could not click any buttons in time.
Finally,
I uninstalled the "Android Auto for phones" application on the device, and I think this was the real solution
I also moved to canary channel for studio, and then needed to uninstall and reinstall the desktop head unit.
After this, I could get the screen to show that I saw flashing before, and I had to accept it once, then it crashed again, then I started it all again, and it is finally working.

Why did android studio change Nexus 6 to sdk gphone x86 arm?

Here are the phones
Here is the error message when I hover over the Nexus 6 phone
"Not applicable for main.dart configuration"
Image system is R. API is 30. Flutter doctor says there are no issues.
Running on macOS Catalina. Android Studio 4.0.1.
How do I get it to work?
Flutter in Android Studio doesn't use the regular Android Studio device selector (the one on the right that's grayed out) because you can also select iPhones as target, which Android Studio's selector cannot do. Disregard that device selector for Flutter development, it's not used. The first one alone determines the phone your Flutter app will run on.
sdk_gphone_<architecture> is the device fingerprint of an official Android emulator. Select your phone's fingerprint (it should be either "Nexus 6", or the Nexus 6's code name, which is "shamu") in the left dropdown menu instead to run it on that, or make sure you have no emulators running.

Android Studio 3.3.1 Emulator bug

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

Emulator wrong screen resolution in Android Studio 1.3

I have updated to Android Studio 1.3 and I'm trying to make a test with Nexus 5 which has a resolution of 1080px x 1920px and when I start the emulator the icons are too big and when I run my app which has a banner of 320x50. This banner is nearly as wide as the screen!
Here is the emulator without any application running, where you can see a very big icons on the screen.
And here is a screenshot with an app which has a banner test of 320x50px
If I select "No Skin" in Custom Skin Definition, it doesn't work for me. In the later image you can see it.
Another example, this is what I see and what I want to see in Android Studio to a Tablet Nexus 7:
And this is what I've got to a Tablet Nexus 7 in Android Emulator: it's too big. Why does this happen?
In the Android Virtual Device Manager click "Create virtual device", select needed one and click the "Clone device" button. Then change "Default skin" to "No skin". Now save the profile and launch it.

Android Studio - How to add a Screen Size Definition

I am building an Android Application using Android Studio.
I want my layout to be as precise as possible, however, it seems that the list of Android Virtual Devices where we can render the layout to is limited to Nexus Devices as shown in this screenshot below:
and the "Generic Phones and Tablets" do not have much screen size and resolution variety, so I decided to add my device definition as such:
However, it did not appear in the devices that Android Studio can render a layout to in the Design view of a layout.
Solved
After restarting Android Studio, the newly created AVD (Samsung Galaxy Note 1) now appeared in my list of devices that I can preview the rendering to when I view my layout.
I think all I had to do was to restart Android Studio for it to appear. It works now.
The solution to this, is to restart Android Studio. The new devices should appear at the bottom of the list.
For others having similar issues, you may want to check the API level of your AVDs vs the compileSDK of your project. I've found that, at least for Wear OS AVDs, my devices that target an earlier API don't show up. Once I made them the same as my compile SDK version, they showed up.

Resources