Problem:
I'm using only command line tools. AVD just worked fine some time ago. Now with various configurations I get only "Starting emulator for AVD..." which simply closes without any error messages and leaving emulator.exe in Task Manager for eternity.
What I've tried:
Various devices, API's, RAM above and below 768, with/without Host
GPU etc;
Reinstall Java;
Reinstall Android SDK;
Run emulator from command line just launches emulator.exe without any errors;
Delete .android folder in User's folder;
Set ANDROID_SDK_HOME variable;
Run SDK Manager.exe/AVD Manager.exe with/without elevated Admin rights;
verbose key gives me the following log:
emulator:Found AVD name 'jkll'
emulator:Found AVD target architecture: arm
emulator:Auto-config: -engine classic (arm default)
emulator:Looking for emulator-arm to emulate 'arm' CPU
emulator:Probing program: C:\Soft\Android\android-sdk\tools/emulator-arm.exe
emulator:return result: C:\Soft\Android\android-sdk\tools/emulator-arm.exe
emulator:Found target-specific 32-bit emulator binary: C:\Soft\Android\android-sdk\tools/emulator-arm.exe
emulator:Adding library search path: 'C:\Soft\Android\android-sdk\tools/lib'
emulator: Found directory: C:\Soft\Android\android-sdk/add-ons\addon-google_apis-google-17\images\armeabi-v7a\
emulator: Found directory: C:\Soft\Android\android-sdk/add-ons\addon-google_apis-google-17\images\armeabi-v7a\
Configuration I am working on:
Windows 10 x64
Android SDK Manager 25.1.1
Java JDK 8 Update 91
i5 CPU with 24GB of RAM
Any suggestions? TY.
I tried all the mentioned solutions. But strangely, I reduced my windows 10 laptop's resolution (from 3840 x 2160 to 1360 x 768) and it worked.
With your verbose I found you are using arm architecture devices.As you are using i5 processor,Windows10 x64 I would Suggest you to use x86 or x86-64 architecture for your devices for this you have to Install Intel x86 Emulator Accelerator (HAXM) from SDkManager.
Hope this helps let me know.
After changed the CPU of my computer and updated sdk, I encounter this problem too.
Now I temporarily solve the problem emulator-x86 I get an error about missing Qt5Core.dll, Qt5Widgets.dll and Qt5Gui.dl:
copy *.dll files in sdk\tools\lib\qt\lib to sdk\tools where the emulator-x86.exe in.
Related
I facing an error while running any emulator with android studio avd manager:
...AppData\Local\Android\Sdk\emulator/emulator-x86.exe: invalid option -- '-enable-whpx'
android studio version is 3.1.3
android emulator version is 27.3.9
Hyper-V and Windows Hypervisor Platform are active on my windows 10
and the WindowsHypervisorPlatform = on flag is set ...sdk\emulator\lib/advancedFeatures.ini
this is a part of verbose mode:
emulator: Checking whether Windows Hypervisor Platform (WHPX) is available.
emulator: Could not load library WinHvPlatform.dll
emulator: WHPX is either not available or not installed.
emulator: CPU Acceleration: working
emulator: CPU Acceleration status: HAXM version 7.2.0 (4) is installed and usable.
Windows Hypervisor Platform is checked in the windows features and the WinHvPlatform.dll is present in C:\Windows\System32
how can i enable or install WHPX ?
My problem solved by simply changing the emulator engine.
According to documentation you can specify the emulator engine with the -engine flag. the mentioned error occur using the classic engine. when i changed the engine to auto or qemu2 the emulator started with no error. to change the engine go to .../sdk/emulator directory with the command line and run:
emulator.exe -list-avds
this will output you virtual devices name
then run:
emulator.exe -avd YOUR_DEVICE_NAME -engine qemu2
or
emulator.exe -avd YOUR_DEVICE_NAME -engine auto
I hope this will help you.
I tried to start AVDs, but I always get following error:
Emulator: Process finished with exit code -1073741511 (0xC0000139)
I tried creating new AVDs and tried to switch usage of "Emulator performance" between "automatic, "hardware" and "software", but nothing helps, I always get the result from above.
The error comes instantly when I try to start an AVD.
Any ideas what could cause this? I think this issue came with the update to android studio 3.0...
Edit - Environment:
Windows 10 (high end business notebook, dell precisison 7510)
Android Studio 3.0
SDK Tools:
Android Emulator 26.1.4: installed
Intel x86 Emulator Accelerator (HAXM installer): installed
What I tried
deleted the complete Android SDK (SDK only, without android studio) and installed it again (without success).
tried using an emulator with auto/hardware/software graphics setting => same exception in every case
updated intel and nvidia driver (it may be related to this, as there exist driver problems with my notebook), but did not help either
deleted virtual device and created a new one => did not help either
Additional informations
Tried to start the emulator with "emulator #Name_of_AVD -verbose" from the command line, this gives me following informations (manually translated, so may not be 100% accurate):
Popup window with following:
Title: qemu-system-i386.exe - Entry point not found
Text: The procedure entry point "_Z4endlR11QTextStream" was not found in DLL "M:\AndroidSDK\emulator\lib64\qt\lib\Qt5Svg.dll".
Popup window with following:
Title: qemu-system-i386.exe - Entry point not found
Text: The procedure entry point "_Z11qt_assert_xPKcS0_S0_i" was not found in DLL "M:\AndroidSDK\emulator\qemu\windows-x86_64\qemu-system-i386.exe".
Complete console output:
emulator:Android emulator version 27.0.2.0 (build_id 4498654) (CL:f388734068bae38c6115263feea33c68eed531fe)
emulator:Found AVD name 'Nexus_5_API_25'
emulator:Found AVD target architecture: x86
emulator:argv[0]: 'emulator.exe'; program directory: 'M:\AndroidSDK\emulator'
emulator: Found directory: M:\AndroidSDK/system-images\android-25\google_apis_playstore\x86\
emulator:Probing for M:\AndroidSDK/system-images\android-25\google_apis_playstore\x86\/kernel-ranchu: file exists
emulator:Auto-config: -engine qemu2 (based on configuration)
emulator: Found directory: M:\AndroidSDK/system-images\android-25\google_apis_playstore\x86\
emulator:emuDirName: 'M:\AndroidSDK\emulator'
emulator:try dir M:\AndroidSDK\emulator
emulator:Trying emulator path 'M:\AndroidSDK\emulator/qemu/windows-x86_64/qemu-system-i386.exe'
emulator:Found target-specific 64-bit emulator binary: M:\AndroidSDK\emulator/qemu/windows-x86_64/qemu-system-i386.exe
emulator:Adding library search path: 'M:\AndroidSDK\emulator/lib64'
emulator:Adding library search path: 'M:\AndroidSDK\emulator/lib64/gles_swiftshader'
emulator:Adding library search path: 'M:\AndroidSDK\emulator/lib64/gles_angle'
emulator:Adding library search path: 'M:\AndroidSDK\emulator/lib64/gles_angle9'
emulator:Adding library search path: 'M:\AndroidSDK\emulator/lib64/gles_angle11'
emulator: Adding library search path for Qt: 'M:\AndroidSDK\emulator\lib64\qt\lib'
emulator: Setting Qt plugin search path: QT_QPA_PLATFORM_PLUGIN_PATH=M:\AndroidSDK\emulator\lib64\qt\plugins
emulator:Quoted param: [M:\AndroidSDK\emulator/qemu/windows-x86_64/qemu-system-i386.exe]
emulator:Quoted param: [#Nexus_5_API_25]
emulator:Quoted param: [-verbose]
emulator: Running :M:\AndroidSDK\emulator/qemu/windows-x86_64/qemu-system-i386.exe
emulator: qemu backend: argv[00] = "M:\AndroidSDK\emulator/qemu/windows-x86_64/qemu-system-i386.exe"
emulator: qemu backend: argv[01] = "#Nexus_5_API_25"
emulator: qemu backend: argv[02] = "-verbose"
emulator: Concatenated backend parameters:
M:\AndroidSDK\emulator/qemu/windows-x86_64/qemu-system-i386.exe #Nexus_5_API_25 -verbose
Emulator settings:
AvdId=Nexus_5_API_25
PlayStore.enabled=true
abi.type=x86
avd.ini.displayname=Nexus 5 API 25
avd.ini.encoding=UTF-8
disk.dataPartition.size=800M
fastboot.forceColdBoot=no
hw.accelerometer=yes
hw.audioInput=yes
hw.battery=yes
hw.camera.back=emulated
hw.camera.front=emulated
hw.cpu.arch=x86
hw.cpu.ncore=1
hw.dPad=no
hw.device.hash2=MD5:1c925b9117dd9f33c5128dac289a0d68
hw.device.manufacturer=Google
hw.device.name=Nexus 5
hw.gps=yes
hw.gpu.enabled=yes
hw.gpu.mode=auto
hw.initialOrientation=Portrait
hw.keyboard=yes
hw.lcd.density=480
hw.lcd.height=1920
hw.lcd.width=1080
hw.mainKeys=no
hw.ramSize=1536
hw.sdCard=yes
hw.sensors.orientation=yes
hw.sensors.proximity=yes
hw.trackBall=no
image.sysdir.1=system-images\android-25\google_apis_playstore\x86\
runtime.network.latency=none
runtime.network.speed=full
sdcard.size=100M
showDeviceFrame=yes
skin.dynamic=yes
skin.name=nexus_5
skin.path=M:\AndroidSDK\skins\nexus_5
tag.display=Google Play
tag.id=google_apis_playstore
vm.heapSize=128
You've to check:
Your size on disk is not full - this's often happen due to creation of some virtual devices that are unused in AVD Manager (So delete unused if any)
The RAM size of Emulator should not minimum as your requirements
In work around steps (tested) :
Restart your Android Studio
Create new device in your AVD Manager
Increase the RAM size of the Emulator
Creating new AVD.
also
Get Android Studio 3.1 if 3.0 is still giving the issue, 3.1 has new DEX compiler D8 where as 3.0 has DX.
as CodeBulls said above instant run may also be an issue
As per my understanding. It will be bst to use Genymotion as compared to AVD. Link is HERE
Download Genymotion.
Download Virtual Box if its not with Genymotion.
Choose Any type device for testing in Android.
NOTE : At Least 4 GB RAM is required to use Both Android Studio and Genymotion.
By Applying some zip files you can also use Genymotion to test for Google Map testing and also you will be able to use Google Play Services
Just thinking of new features Multi-dex or Instant App Settings are messing up with your project. One last try:
Disable Instant Run
To disable Instant Run:
Open the Settings or Preferences dialog. Navigate to Build, Execution,
Deployment > Instant Run. Uncheck the box next to Enable Instant Run.
Ignore if you feel this is inappropriate.
The exit code -1073741511 (0xC0000139) Stands for Some Error with C or C++ Dependency File. That is Some DLL Files ae Missing For The Emulator.
So Update Android Emulator From SDK Tools
Update and Instal Google play Intel Atom x86 System Image for the SDK Platform which is Using to Run The Emulator (API 25).
Hope This Will Help You to Resolve Your Problem
Hi please check below things into your notebook.
This happens when you upgrade your windows and hyper-v virtual machine's configurations are not updated alongside.
Open Hyper-V Manager app (in windows 10) > choose your machine that's giving erros > on the right, click 'upgrade configuration' and choose 'upgrade'.
That should update your Virtual Machine configuration for that windows 10 phone emulator and the emulator should work fine.
This problem occurred on both of my laptops and doing this fixed it.
if your problem is still not solved then please follow below link it helps you.
http://www.itwriting.com/blog/9371-how-to-run-android-studio-on-windows-without-disabling-hyper-v.html
hope this helps you try it.
When i run a x86 emulator, it won't start. I tried run this command on terminal:
/home/username/Android/Sdk/tools/emulator -avd Nexus_5X_API_26 -netspeed full
and ı got this output: emulator: WARNING: Not all modern X86 virtualization features supported, which introduces problems with slowdown when running Android on multicore vCPUs. Setting AVD to run with 1 vCPU core only.
arm emulators run but x86 emulators don't.
My os: Debian 9
First of all check your code for errors if everything ok
Second check that you have intel haxm installed and working
I hope that I have helped you
When I run an AVD from the Terminal on Ubuntu 14.04, the following command is working without problems:
my_name#host:~$ emulator -avd my_avd
But when I want to use tcpdump to capture the network-traffic, the emulator fails to start:
my_name#host:~$ emulator -avd my_avd -tcpdump ~/test.cap
qemu-system-i386: -tcpdump: invalid option
I have no problems running the emulator with tcpdump on Windows, but on Ubuntu and Debian it refuses to work. Might this be a Bug or am I missing something? The same problem occurrs when I want to use the option -timezone Europe/Berlin. In contrast, the option -dns-option 8.8.8.8 is working fine. The problem occurrs for every AVD.
Android SDK:
SDK Tools 25.1.1
Platform-Tools 23.1
Build-Tools 23.0.3
Android 6.0 SDK Platform Revision 3
Android 6.0 (Intel x86 Atom Image 32/64 Bit Revision 8 and ARM EABI v7a Image Revision 3)
Virtualization (KVM) is enabled on Intel Core 2 Duo. Oracle JDK 8 is installed.
The same behavior occurred on my Mac, the solution seems to be to add -engine classic to your command line call. So it reads:
my_name#host:~$ emulator -avd my_avd -tcpdump ~/test.cap -engine classic
Credits go to #Interix for posting this here
According to your emulator, -tcpdump is an invalid option. Check emulator -? or man emulator for the syntax. However, I'd be surprised if this would normally work at all - I haven't seen tcpdump integrated with anything as an argument by itself (though I'm sure it's not impossible).
Normally I'd expect to use tcpdump as a command by itself. Depending what tools you have installed, I'd run up the emulator, check what ports it's running, and run tcpdump against its port range separately if you're looking for incoming traffic. If it's outgoing, use tcpdump to trace the traffic to the destination you're going to use.
When I am try to open my android emulator, getting below error
distrib/android-emugl//host/libs/Translator/GLES_V2//GLESv2Imp.cpp:glAttachShader:187 error 0x501
distrib/android-emugl//host/libs/Translator/GLES_V2//GLESv2Imp.cpp:glAttachShader:187 error 0x501
TextureDraw: Could not create/link program:
creating window 79 106 321 535
emulator: emulator window was out of view and was recentered
emulator: UpdateChecker: skipped version check
draw: no program
Emulator details:
API 17
CPU armeabi-v7a
RAM - 746 MB
I have core 2 duo 1.4 GHz Dell Inspiron system
When I try to install HAX it says my system does not support Virtualization. I tried to start it from BIOS but I guess my system doesn't have it.
After trying many different things this is what finally worked for me.
Delete all existing AVDs
Uninstall Intel HAXM
Create a new AVD and it will make you install HAXM
Create a new AVD
Worked for following config:
Name: Nexus_5X_API_19 CPU/ABI: Google APIs (x86 System Image) Intel Atom (x86) Path: C:\Android\.android\avd\Nexus_5X_API_19.avd Target: google_apis_x86 [Google APIs (x86 System Image)] (API level 19) Skin: nexus_5x SD Card: 100M hw.dPad: no
However, similar config for API 21 still getting errors.
Same things happen with me when i format my PC and after install OS and install the Android Studio. I have tried #farrukh najmi answer and i have to extends the some more information on it.
1] Delete the avd from .../User/.android/avd/Nexus_5_API_26.avd folder and file
2] Restart android studio.
3] Create new AVD.
and start that new AVD and its work form me. I hope this information will help some one
My suggest is to have a look at Genymotion, it will offers you a better experience.