IntelliJ Idea - Android Virtual Device doesn't start - android

I'm using IntelliJ Idea 13 to develop Android applications on Ubuntu 12.04 64-bit. But my virtual device never starts despite there is no error.. its screen always stays like this:
My Android target level is 4.4 (API 19). How can I solve this issue?
Edit: Here is my AVD details:

I Recommend you look at this post to a similar question.
https://stackoverflow.com/a/5535532/2978914
they are using eclipse but you should be able to view the logcat, other posts say first load can be ridiculously long.
the spec of your PC may come into play as this post https://superuser.com/a/347298 explains the way the emulator converts to arm opcode: direct quote:
To use emulator more effectively, this is my experience:
Don't close emulator everytime you run your application.
Scale the emulator screen smaller.
Disable snapshot (Yes, it's useful but it takes time to close the emulator).
Specify a file path for SD card image file. I use only one SD card for many AVDs.
If you got any problems in adb, just reset adb, don't close emulator.
Open few programs in your operating sytem.
If you are using Windows, don't ever close emulator. Do it combined with Hibernate of Windows.

My AVD has started after I check "Use Host GPU" option from "Emulation Options".

Related

Android Studio's emulator with black screen

I have a problem when I tried to start my AVD in android studio. It was working fine but all of a sudden it just turns black. I have tried to restart my pc but it didnt help. Any solution? Or is there any AVD application that I can use because android studio's AVD is kinda slow.
This also happens to me from time to time. To fix this, open your AVD Manager. Then, click the arrow to the far right. Finally, click Cold Boot Now.
I will say it will be better if you use physical mobile devices and the step to use that is mentioned below:
Pre-requesting:
Android Studio
USB cable
Android Device
Steps:
Enable USB
debugging(Link)
Automatically get device driver install on the system.
Run your app using a connected device. check ou this link
Why I am suggesting to you because this will improve your productivity of coding.
If you want multiple device testing then only go through Virtual emulator such as BlueStack, GenyMotion, AndY which I used and prefer more due to of less memory uses.
You can try Genymotion instead. It is faster than android studio's AVD and easy to use. Also in some cases, you might have riot vanguard (riot games anti cheat system), and you need to uninstall it to use android studio's AVD.

Android emulator keeps on crashing

Whenever I open the AVD Manager and launch any one of the virtual devices I created, the emulator starts and closes immediately. When I run the virtual device in AVD Manager for the first time I get an error message that QEMU has stopped working.
I have given the right path to the JDK. More over, I have tried to install Android Studio again and again, but still its not working. I am using Windows 7(32 bit, 2GB RAM, without graphic card).
Is there need of graphic card to run emulator? If not, what should I do the run the emulator?
In AVD manager open settings for your virtual device.
In the Emulated Performance section open the dropdown for Graphics.
Change it from Automatic to Software.
Hit the Finish button to save new setting and try starting the emulator again.
I finally found the solution here: https://www.bram.us/2017/05/12/fix-for-the-android-emulator-crashing-during-launch/
It seems to be an incompatibility with other software, such as Docker, Oracle Virtual Box and other products that use VCPU. In my case, it seems that VBox and/or DraftSight caused the issue. I don't get the error when I terminate those applications first.
After trying Vahid's answer, it stopped crashing. Unfortunately it was lagging badly. After installing the NVIDIA drivers for my card (I have a 1060), I was able to change the setting to Hardware again, and now it is much smoother.
In most cases the solution provided above by #Vahid would work but if for some reason you still want to use hardware for graphics. You can try upgrading graphics drivers and make sure to set your graphic profile aka GPU workload to Graphics instead of compute. This settings can be found in Nvidia control panel or AMD Radeon software settings, not sure if this would work for integrated graphics.

Visual Studio Android Emulator Black Screen in Apps periodically

I'm currently beginning app development using Xamarin with Visual studio in a virtual machine (My actual PC doesn't support android Emulation but the server next door does).
Whenever I have the virtual android device (using Visual Studio Emulator for Android) open and am using or debugging apps I get a black screen for some unknown reason, I can stop this behaviour by clicking where the home back and app manager buttons would be and this returns me to the app.
After reading other questions and responses online I don't believe my issue is similar, many have issues with flat out black screens with no interactivity, whereas my issue is different.
Some specs:
Virtual Machine I am developing in:
Intel xeon E5 2630 v4 2.2Ghz
12 GB dedicated to my machine
Android device:
5" KitKat (4.4) XXHDPI Phone
API Level 19
If anybody knows what could be the cause of this issue and perhaps a solution, it would be greatly appreciated
I contacted Visual Studio Android Emulator Feedback to get an answer to my question, I got a reply saying that Microsoft do not officially support nested VM's as there is no dedicated GPU provided to the system.
However there is a workaround which is disabling OpenGL, I tried this method myself but I find the emulator becomes rather slow and far less responsive. By the way disabling OpenGL is also unsupported.
Disabling OpenGL
In VMWare Fusion, under General settings, for the OS Type, you’ll need to change it from Windows 8.1 to “Hyper-V (unsupported)”. I would also suggest at least 2 processors and 4gb of ram (6gb is better depending on the Android VMs you want to run)
In Windows, you’ll need to edit the c:\program files (x86)\Microsoft XDE\10.0.10240.0\skus\android\xdesku.xml file and remove the following line from the file: GuestDisplayProvider=”VsEmulator.OpenGLGuestDisplay”
Source of Method

Android SDK Emulator won't load

So i'm having awful trouble trying to get the Emulators in the Android SDK to start up. I can create the AVDs just fine, and then when hitting the 'start' button from the SDK Manager, bring up the small loading console window, indicating that the emulator is launching. However, after that, nothing happens!!
I have read many threads and posts with people having the same problem, maybe to do with the settings requiring too much memory, with some people waiting 30 minutes for the emulator to load!!
When trying to run the AVD emulator through terminal, I simply get a 'Bus Error' with no further indication of what could be going wrong...could it be a memory issue?
What I did to get where I am now:
Download the Android SDK package for Mac. I'm extracting the sdk only, not eclipse. I'm on Mac 10.6.8.
Install the SDK, and download the latest version of Android in the SDK Manager, along with default tools.
create a AVD and hit start.
window pops up to boot the emulator, that process is complete and window closes.
Nothing happens.
My knowledge of the sdk tools are very limited, all I want is to be able to do some testing...
Any help greatly appreciated!
Thanks
Actually, the simplest way to get emulators running right now is probably GenyMotion. They provide an interface, and pre-configured emulator images to make it pretty simple to get running.
This is not an endorsement (I use the standard ADT myself) but a lot of people find their tools useful.
Here is my suggestion: instead of using AVD, start using espresso and virtual remote android hardware emulator from Google servers - also known as android-test-kit. You will have the possibility to run and test you App on several different devices, without the need to spend money on actually all different devices for developing and testing purposes before releasing your Apps. You find further details here:
android-test-kit
Why Espresso
The 2 videos are somewhat long, but worth watching.
Taking this approach will solve your problem, save you money, and improve your productivity.
I run into the same issue on my mac 10.6 and it only works if i do
emulator64-x86 -avd my_android
Besides, my virtual device has to configured using x86 but not ARM
maybe this link can help you.

Increasing the Android SDK emulator speed

How do I increase the speed of the virtual device emulator in the Eclipse SDK for Android app development?
I have been searching all over the internet to find out how to speed this thing up, but I can't seem to find a fix that actually works for me.
Another problem I'm having is that I can't get the RAM above 1024MB.
Thanks for all the help. I have now fixed the speed. For anyone with the same problem, make sure this box is checked.
However, I still can't get my RAM above 1024 MB. What's the fix for that?
Method I've found which has worked on both my laptop and desktop that I use for development is when you create or edit the Android Emulator (AVD) there is an option near the bottom that says use Host GPU.
I've have found this to work on all Android versions
UPDATE
I missed the bit about the RAM problem. You haven't said if there is an error regarding the memory issue, but if you seeing failed to allocate memory: 8 then you need to modify the AVD config.
Go to C:\Users\your_name.android\avd\avd_name\config.ini and find hw.ramSize and make sure that MB is on the end of the number.
If you use an Android virtual device with Intel system image, you can enable HAXM(Hardware Accelerated Execution Manager) to speed up code execution. Take a look at this article: http://developer.android.com/tools/devices/emulator.html#acceleration
I would suggest to lower the resolution of the emulator to 320x480 and remove the skin of it (and learn the hotkeys).
If the hardware acceleration can work with your machine, try it. I've enabled it but never noticed any difference.
If that doesn't fit your needs, you can use other alternatives, which are faster, but have less features and I haven't tested them much:
VirtualBox together with androidx86 - only one I've tested and debugged an app on, but it was a long time ago.
Bluestacks - had lots of bugs, but seems promising.
WindowsAndroid - new, works, but I can't find out how to connect via adb.
Same as #1, but with androidvm instead of androidx86.
Genymotion - alternative emulator.
Try using Genymotion. I think that it would be a good choice. https://cloud.genymotion.com/page/customer/login/?next=/page/launchpad/download/
You can change it to least :
also :
and change the Screen coordinates from here :
note : in first step choose the Edit ,and the second step choose the start
Complete speed up android emulator sollution step by step cań be found also for beginners here:
Speeds Up the Slow Android Emulator
This sollution worked on my i3 machine very well. I have tested many sollutions and emulators for days, but this one is fastest and best for me.
Follow the following steps to make android emulation almost as fast as a real device.
Start the AVD Manager and create a new AVD with the Target value of Android 4.0.3 (API Level 15), revision 3 or higher (And choose the other settings like usual).
In Eclipse, click your Android project folder and then select Run > Run Configurations...
In the left panel of the Run Configurations dialog, select your Android project run configuration or create a new configuration.
Click the Target tab.
Select the AVD you created in the previous procedure.
In the Additional Emulator Command Line Options field, enter:
-gpu on
Run your Android project using this run configuration.
I have tried this and i confirm the result is a noticeably fast emulator (sometimes faster than a real device).
Ref - http://developer.android.com/tools/devices/emulator.html#acceleration

Categories

Resources