I am using Android Studio in Windows 8.1 with 4 GB RAM; given 2 GB to virtual memory. But when ever I run the emulator I get the following:
C:\Users\CSE\AppData\Local\Android\sdk\tools\emulator.exe -avd Android_API_21 -netspeed full -netdelay none
emulator: device fd:828
HAX is working and emulator runs in fast virt mode
emulator: warning: opening audio input failed
creating window 0 0 384 729
emulator: emulator window was out of view and was recentered
The emulator starts and suddenly stops showing massage:
emulator-x86.exe has stopped working
I have edited the current device & also created new AVD with resolution 800x600 and RAM 512 MB ( & less ) but nothing works. HMAX is installed.
Suggestions will be really helpful. Thanks in advance.
Here is how I solved in a laptop with Windows 10 + HAXM enabled, to run the default "Nexus 5 API 23 x86" Device.
My laptop has 2 video cards, the integrated Intel HD 3000 and a GeForce 525M.
On NVIDIA Control Panel, switch "Preferred graphics processor" to Auto-select or Integrated graphics.
The emulator doesn't work here when I set the NVIDIA GPU as preferred.
Check this path
C:\Users\Username.android\avd. Edit the file emulator-user & set the window.x = 0, window.y = 0
Create the hdpi virtual device like Nexus S 4.0 480x800 hdpi.
In AVD Manager, Select your device which is stopped. And click the edit in the right side of the wizard. It shows the options and features of your current device like ROM size, Internal and External Storage etc.
Uncheck the Use Host GPU.
In that wizard select Show Advanced Settings -> Memory and Storage -> RAM: 764MB
VM heap: 32MB
Internal Storage: 200MB
Change these settings and restart your Android Studio
Related
I created an emulator via Android studio AVD.
when i run the emulator, it show a message saying
your gpu driver information :
make:8086
Model:Intel (R) HD graphics 4000
device id :0166
Some users have experienced emulator stability issues with this driver version. As a result, were selecting a compatibility renderer. Please check with your manufacturer to see if there is an updated driver available.
https://i.ibb.co/60pY4pm/emulator2.jpg
I Added Android Studio to my nvidia card to run automatically on GPU driver whenever i open android studio
I Also added emulator executive files to nvidia card control
So it supposed that the emulator run on My nividia GT 365M not intel 4000
http://i63.tinypic.com/5bd7vk.jpg
But same message appear and my emulator is extremely slow
it is on that stage after 15 min of running
http://i66.tinypic.com/2zfv2hz.jpg
I tried every single option in emulator setting
http://i68.tinypic.com/71jpm0.jpg
***I tried to run the emulator by command line
emulator -avd pixel -gpu on
But the same problem
**** I enabled Intel HAXM (intel hardware acceleratio),,,nothing changed
********I ensured that my nividia card Driver is up-to-date
My Laptop Specs
CPU Intel Core i5 (3rd Gen) 3210M / 2.5 GHz
*Number of Cores Dual-Core
*Cache 3 MB
*Ram: 6 GB
*Graphics Processor Intel HD Graphics 4000
*Graphic card : nVidia GT365M
What is the solution ?
problem solved by installing intel 4000 graphic card update
https://downloadcenter.intel.com/product/81499/Intel-HD-Graphics-4000
but I still think my emulator runs on Intel card not GPU nividia card
any solutions for that ?
I am a newbie to android development and am running Ubuntu Linux with an AMD cpu. I installed Android Studio, JDK, SDK, etc, and have been trying to run the emulator. However, whenever I try launching the emulator, it stays a black screen. The message I repeatedly get in terminal is
WARN - run.EmulatorConnectionListener - Emulator not ready yet, dev.bootcomplete = null
I have tried waiting for a while, I have tried updating it, I have tried different APIs, I have tried setting emulated performance to software, and everything else I could find online. Help would be greatly appreciated!
Specs:
Ubuntu 16.04 LTS
Android Studio 2.3.3
Radeon R9 270x 4gb
AMD FX4100
32g ram
SVM is enabled in BIOS
This happened to me recently (emulator with black screen, with all AVDs, even those which worked previously), maybe after some system or Android SDK updates.
How I fixed it:
delete whole .android directory (is in your home directory) - backup this directory before deleting (it contains your AVDs, your debug signing key or other things you might wish to return to later) - yes, this was the thing that really helped
create new AVD - you have to do this after deleting that .android directory (it did not work if I copied backed up AVD back there)
For reference, here is AVD configuration which works for me now (created directly using Android SDK, not using the wizard in Android Studio):
Device: Nexus One (3.7", 480 x 800: hdpi)
Target: Android 7.0 - API Level 24
CPU/ABI: Intel Atom (x86_64)
Keyboard: [x] Hardware keyboard present
Skin: Skin with dynamic hardware controls
Front Camera: None
Back Camera: None
RAM: 1024
VM Heap: 64
Internal Storage: 200 MiB
SD Card: (empty)
[ ] Snapshot (unchecked)
[ ] Use Host GPU (unchecked)
Build was successful but when I tried to run the project using AVD, it shows the following message. I'm not sure what went wrong.
Warning: No DNS servers found
emulator: device fd:608
HAXM is not working and emulator runs in emulation mode
emulator: The memory needed by this AVD exceeds the max specified in
your HAXM configuration.
emulator: AVD RAM size = 1536 MB
emulator: HAXM max RAM size = 512 MB
emulator: You might want to adjust your AVD RAM size and/or HAXM
configuration to run in fast virt mode.
creating window 43 59 329 583 emulator: UpdateChecker: skipped version
check
You need to adjust your adb ram size.
First open android studio.Then at the top icon bar you can find this icon.Click it.This will open all available virtual device you have.Select your virtual device and at the right you can find this icon .Click it.This will open a new window.At the bottom of this window you can find this .Click it.Then there will be a section like this .Then change RAM size 1536 to 512.Like this .Now click finish and run your application.
Edit:
If your target api is upper than 19 then you need to adjust your haxm installer ram size because when you run your app the avd ram size will increase to 1 GB.
So how to adjust your haxm installer ram size.Follow the step mentioned below.
If you install android studio by it's default position then you can find haxm installer in this locaiton
'C:\Users\Niyamat\AppData\Local\Android\sdk\extras\intel\Hardware_Accelerated_Execution_Manager'
Go to this location(make sure you change userName Niyamat to your username).Click "intelhaxm-android" and run it.Then an alert dialog pop up like this click yes.Then click Next.And finally click Set manually.and remove 512 and add 1024.Something like this .Then click next then install.Wait few seconds for install.And that's it.I think now you can run your app on your virtual device.
Hope this help!
HAXM RAM size should be more than AVD.
Better decrease the RAM size of AVD by editing the emulated device or the other way increase HAXM RAM size.
HAXM RAM size should be more than AVD. Decrease the RAM size of AVD or increase HAXM RAM size.
To reduce ram of avd (Wich I recommend)
Go to your avd manager. Delete the emulator and create a new one. However for the new one make sure it's ram is less than 512 mb.
i have a problem when i am trying to run my app with a emulator that its 2 hours and it didn't started until now
and this message was printed
emulator: device fd:892
HAXM is not working and emulator runs in emulation mode
emulator: The memory needed by this AVD exceeds the max specified in your HAXM configuration.
emulator: AVD RAM size = 1536 MB
emulator: HAXM max RAM size = 512 MB
emulator: You might want to adjust your AVD RAM size and/or HAXM configuration to run in fast virt mode.
creating window 43 59 329 583
emulator: emulator window was out of view and was recentered
emulator: UpdateCheck: current version '24.4.0', last version '24.4.0'
I guess you said '2 hours' with exaggeration.
First 1536 MB Ram for an emulator is too much. You can reduce it to 512 or lower. Also I suggest you to use GenyMotion which is more faster and useful than standard android emulator (at least it my i3 device).
Using GenyMotion, I'm creating 320x480, Jell Bean emulator with 512 MB RAM in 1-2 minutes.
When you create an emulator using the AVD choose advanced settings and change the RAM to 1536MB. or just edit you current device the same way.
I found some ideas how to run android emulator faster, but for Nexus 4 configuration still it doesn't work correctly.
My PC:
AMD Phenom II X4 955 (4 x 3,20Ghz)
4 GB ram memory
ATI 5750
Windows 7 64bit
Virtual Device Configuration:
Name: Nexus 4 ;)
Device: 4.65" 720p (720 x 1280: xhdpi)
Target: Android 4.2.2
Skin: Display a skin with hardware control - checked
RAM: 756
VM Heap: 64
Internal Storage: 200MiB
PC is very fast updated but without SP1 - because after SP1 some games and application were working slower for me then before SP1.
So, main issue is: emulator works all the time with 'lag'.
For ex: I clicked 'menu' button and then I was waiting 3s to see list of apps.
And everything on emulator is working like this. It is very tiring to make good tests.
Do you have some ideas how can I improve it?
Best Mob86.
The emulator runs at a usable speed with top end machines, but has a slight delay on older ones. There is no need to run the AVD on a Virtual Machine. But it seems to be faster that way. The emulator takes long to startup but you don't have to close it after testing, the reason for this is it is starting up the android OS, much like booting windows.
What you can do?
Disable boot animation (speeds up boot time)
Use Host GPU (use with nvidia cards, renders with your GPU)
Snapshot (boots up from snapshot of previous boot)
Further info can be found here.
I am using: http://www.genymotion.com/ this is virtual android device based on VirtualBox and run faster than nexus 4.
Start the emulator using this cmd line
emulator -no-boot-anim #your_emulator
It reduce 50% boot time..