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.
Related
First of all, my bug is similar with this one: Where to get this missing file - Android Studio , Emulator
While for all, I installed the latest sdk info in android studio:
The thing is I can only run x86/x86_64 image AVD in my computer. These images works well. But when I try to use other, take arm for example, things don't work out, the AVD just hang there and command output
上午11:33 Emulator: statvfs('/home/f0rm2l1n/.android/avd/Pixel_aarch.avd/snapshots/default_boot/ram.img') failed: No such file or directory
上午11:33 Emulator: Warning: QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled ((null):0, (null))
上午11:33 Emulator: queryCoreProfileSupport: swap interval not found
I tried with choosing Cold Boot and Raising RAM & Storage. But it is not solved.
Any suggestions will help? I just want to run a AArch64 AVD for homework XD
I'm new to android studio. When I try to run my first programme in android studio on the emulator, I get this error.
I have searched through other comments and have also tried decreasing my build.gradle from 24.0.0 to 23.0.3 as shown below, but it still doesn't work. I'm running on Nexus 5X API 23.
android {
compileSdkVersion 24
buildToolsVersion "23.0.3"
}
The error shown is:
Cannot launch AVD in emulator.
Output:
emulator: WARNING: userdata partition is resized from 756 M to 800 M ERROR: resizing partition e2fsck failed with exit code 8
Hax is enabled
Hax ram_size 0x60000000
HAX is working and emulator runs in fast virt mode.
emulator: Listening for console connections on port: 5554
emulator: Serial number of this emulator (for ADB): emulator-5554
I had the same issue after updating Android SDK tools package to version 25.2.2. To fix the problem i've restarted Android SDK Manager and then created new virtual device instead of using the old one.
I know this is an "old" question, but the following command solved the problem for me:
./emulator -data /sdk/path/here/system-images/android-API/default/x86/userdata.img -avd your_avd_name
where API is the api level you want to use. I found that this is only needed for API<20
Note: I had that problem with libstdc++, so I had to use the LD_PRELOAD envvar. I removed it in the example, so for me, the complete command looks like this:
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 ./emulator -data /home/username/Android/Sdk/system-images/android-API/default/x86/userdata.img -avd Whatever
I ran into the same type of problem after installing an update to one the SDK platforms, except my output log contained more than complaints. It contained a possible solution to the problem. See the log below.
emulator: WARNING: userdata partition is resized from 769 M to 770 MERROR: resizing partition e2fsck failed with exit code 8
Hax is enabled
Hax ram_size 0x40000000
HAX is working and emulator runs in fast virt mode.
emulator: Listening for console connections on port: 5554
emulator: Serial number of this emulator (for ADB): emulator-5554
Your emulator is out of date, please update by launching Android Studio:
- Start Android Studio
- Select menu "Tools > Android > SDK Manager"
- Click "SDK Tools" tab
- Check "Android SDK Tools" checkbox
- Click "OK"
Emulator Android_Accelerated_x86_Nougat is running.
Waiting for emulator to be ready...
Solution 1: Update the SDK Tools
Open Android SDKs and Tools window.
Go to the Tools tab (the name of this tab has changed).
Expand the Android SDK Tools group and make sure you select the
latest available version.
Click Apply Changes.
Possible problem with this solution:
You may run into a new problem by following this solution. When you run the emulator it will do a cold boot and ask you for a decryption password. If you don't provide the right password, it will display a black screen and then tell you that the decryption failed.
So this did not work in my case, but your mileage may vary.
Solution 2: Factory reset the emulator
I don't use Android Studio. I use Xamarin with Visual Studio. Installing the Xamarin Device Manager and doing a factory reset of the emulator is what fixed the problem for me.
You should have a similar option if you are using Android Studio. But if you would like to, you can try downloading and installing the Xamarin Device Manager by Microsoft. It's an independent application that does not require installation of Visual Studio or Xamarin.
The misleading ERROR: resizing partition e2fsck failed with exit code 8 when starting an Android Virtual Device (AVD) can occur when you have an old version of Android SDK installed, but without the Android Studio. The old standalone graphical SDK Manager is deprecated as of SDK Tools v25.2.3 - running it does not report any errors, but does not properly update your Android SDK.
Use the new command line SDK Manager ./sdkmanager --update to properly update your Android SDK and the e2fsck failed with exit code 8 problem will be gone.
More information: How to update Android emulator without Android Studio?
WARNING: userdata partition is resized from 756 M to 800 M
For this warning set Internal Storage = 756 MB
error warning will be removed.
Change disk.dataPartition.size to 756M in:
~/.android/avd/your_avd_name.avd/config.ini
I had the same issue, and tried everything that is suggested above, without success.
Being desperate, I tried every menu I could find in AVD. So, I came on "show on disk" menu, at the right of the line of my device, in AVD device list.
Android Studio opened an explorer window, and showed me a directory with a name not matching my device name... Probably because I had renamed my device in AVD, and Android Studio had not reported this change on disk.
So I deleted my device, created a new one with same parameters, verified that directory and name matched, and launched the device... and it worked!!!
Hope this will be helpfull to anyone...
None of the answers here solved my issue, but I did find this after searching for a while and it solved my issue. If all else fails, check out the answer here:
Emulator: ERROR: resizing partition e2fsck failed with exit code 1
I can't start any x86 Android emulator on my laptop running Windows 7.
I have tried installing HAXM both through the extras folder in the Android SDK as well as directly downloading it from Intel's site and installing version 6.0.1 with no luck.
VT has been turned on in the Bios.
When I start an emulator I get the error
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAX version (2) is too old (need at least 3).
If I run haxm_check.exe I get
VT support -- yes
NX support -- yes
Running sc query intelhaxm gives me
SERVICE_NAME: intelhaxm
TYPE : 1 KERNEL_DRIVER
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
I have VirtualBox installed, but VMVare is not running. I even stopped all the VMWare services. I don't believe it's any antivirus problem.
Googling HAX version (2) is too old (need at least 3) shows this source code https://github.com/ashishb/android_emulator/blob/master/android/emulation/CpuAccelerator.cpp but can't glean anything from it.
Any ideas?
The reason is that there was an old version of HAX driver (version 2) and the latest version of HAXM driver (file version 6.0.3, HAX driver version 3) is not installed successfully because it has some mismatch file name in its intelhaxm.inf file (see step 5) even if it says "install successfully" after you run the installer file on the machine.
Following are steps how did I fix the problem, step 1 to 3 are to remove the old driver and step 4 to 9 are to fix new version problem and install it, the <android-sdk> below should be your Android SDK directory.
Select Computer and Mouse right click menu, Properties->Driver Manager
Menu View->Show hidden devices, in the tree category Non-Plug and Play Drivers, find the IntelHaxm and uninstall the driver if found it.
Remove old intelhaxm driver folder: C:\Windows\System32\DRVSTORE\intelhaxm_579C88F702D572C10DF6C9F1668B2077995F4354
Go to <android-sdk>\extras\intel\Hardware_Accelerated_Execution_Manager and extract the install file intelhaxm-android.exe to folder intelhaxm-android using 7-zip or some other archive program
Go into the extracted folder intelhaxm-android and again, use 7-zip extract the hax64.msi to folder hax64
Go into folder hax64 and remove all .win7_64 suffix from the file names of the inf, sys, and cat files for your OS (win7 or vista), example for windows 7 64bit:
intelhaxm.inf.win7_64 rename -> intelhaxm.inf
intelhaxm.sys.win7_64 rename -> intelhaxm.sys
intelhaxm_x86.cat.win7_64 rename -> intelhaxm_x86.cat
The key step: rename file intelhaxm_x86.cat to IntelHaxm_x64.cat. (Because file reference CatalogFile.ntamd64=IntelHaxm_x64.cat in intelhaxm.inf is actully IntelHaxm_x64.cat instead of intelhaxm_x86.cat)
Open a command window with Administrator privilege and run sfc /SCANNOW and then reboot the machine
After windows up, open a command window with Administrator privilege in that <android-sdk>\extras\intel\Hardware_Accelerated_Execution_Manager\intelhaxm-android\hax64 folder and run this command to install the driver HaxInst64.exe /i intelhaxm.inf 1, there should be no ERROR reported.
run this command to verify that it is working sc query intelhaxm, it should return with a state of 4 (Running)
Try to run AVD manager.exe in <android-sdk> to start your device simulator to check if works.
That's all.
Reference: FIX HAXM 1.1.1 on Windows 7 64bit
I had the same issue with Android SDK 24.0.0 rc3. Turned out it has nothing to do with HAXM but SDK Tools which don't get the correct version.
I then downloaded SDK command line tools 24.4.1 from https://developer.android.com/studio/index.html#downloads and copied all the files over my existing SDK (which was installed with Android Studio last week (android-studio-bundle-143.2915827-windows.exe)). Fun is, that Android Studio is not listing this update in the SDK Manager and says 24.0.0 rc3 is up-to-date.
After that launching an Emulator works with the SDKs default AVD Manager (located in the SDK root), but not from Android Studio. Android Studio still says my HAXM is out of date, it obviously does not recognize the correct version 6.0.1.
Please not that i'm not an Android Expert and have not yet tested any side-effects of the quick-and-dirty SDK Update. Maybe a fresh install of a seperate Android Studio and Android SDK is better.
Hope it resolves your issue as well.
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.
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.