Ubuntu: Desktop 14.04 (64-bit)
VirtualBox: Version 5.0.16 r105871
Android SDK: 24.4.1
I am trying to get Android Emulator running on Ubuntu 14 (Trusty Tahir).
I first downloaded and installed Ubuntu 14 in a new Virtualbox VM.
Downloaded and installed OpenJDK (apt-get openjdk-7-jdk).
Downloaded and untar-ed the android sdk archive.
Navigated to android-sdk-linux/tools/ and ran ./android
Android SDK manager, pulled SDK build revision 19 (for Android 4.x) and 23 (for Android 6).
After all the packages have been downloaded and installed, i launch Android SDK Manager once more, and click Tools > AVD Manager.
Created a new Nexus5 / Google Nexus AVD. Click 'Start'.
This is when I see the following errors:
Starting emulator for AVD 'AspectClass'
pci id for fd 5: 80ee:beef, driver (null)
libGL error: core dri or dri2 extension not found
libGL error: failed to load driver: vboxvideo
pci id for fd 8: 80ee:beef, driver (null)
libGL error: core dri or dri2 extension not found
libGL error: failed to load driver: vboxvideo
emulator: WARNING: Classic qemu does not support SMP. The hw.cpu.ncore option from your config file is ignored.
emulator: WARNING: The -scale flag is obsolete and will be ignored.
My research into a couple of these errors like the core dri/dri2 lead me to resources that indicate this might have something to do with 3D acceleration setting in Virtualbox. This does not apply to my case since I have 3D acceleration setting disabled.
Any help would be appreciated.
1) Make sure u have latest Android Studio 2.0, update java sdk version to 8
2) start emulator from android studio, if any issues. restart ubuntu,
3) go to boot option usually by pressing F12(or)F2, there enable fast virtual machine option and save and exit. Also enable the same option fast virtual mode in Virtual box VM if any.
4) After login start Emulator from Android Studio. Thats it
Android studio 2.0 has so many improvements http://developer.android.com/sdk/index.html
Related
This question already has answers here:
Just updated to Android Studio 4.2.1 on Mac and now emulator no longer works
(8 answers)
Closed 1 year ago.
Below error I get when trying to launch a emulator from terminal on MAC
user ~ $ emulator -list-avds
Pixel_4_play
user ~ $ emulator #Pixel_4_play
emulator: Android emulator version 30.7.4.0 (build_id 7453540) (CL:N/A)
handleCpuAcceleration: feature check for hvf
cannot add library /Users/user/Library/Android/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libvulkan.dylib: failed
added library /Users/user/Library/Android/sdk/emulator/lib64/vulkan/libvulkan.dylib
cannot add library /Users/user/Library/Android/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libMoltenVK.dylib: failed
added library /Users/user/Library/Android/sdk/emulator/lib64/vulkan/libMoltenVK.dylib
emulator: INFO: GrpcServices.cpp:315: Started GRPC server at 127.0.0.1:8554, security: Local
emulator: INFO: EmulatorAdvertisement.cpp:93: Advertising in: /Users/akumar8/Library/Caches/TemporaryItems/avd/running/pid_61379.ini
dyld: lazy symbol binding failed: Symbol not found: _preadv
Referenced from: /Users/user/Library/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _preadv
Referenced from: /Users/user/Library/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64
Expected in: /usr/lib/libSystem.B.dylib
Abort trap: 6
Also tried using AVD Manager, it still fails to launch a emulator. I get error saying "The emulator process for AVD was killed"
Could someone please help me with this.
My Mac info:
MAC OS Catalina - 10.15.7
Finally the issue is resolved.
A new update version - 30.8.4 is available now for Android Emulator which resolved the issue for me.
How to Update:
Please go to Android Studio > Tools > SDK Manager
Once SDK Manager opens, choose Android SDK from left
Now choose SDK Tools tab from right.
Search for Android Emulator to update it to 30.8.4 version.
Done.
Now open AVD Manager and launch emulator. It would work as expected.
I'm getting this error:
12:53 PM Emulator: C:\Users\tenni\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: error while loading state for instance 0x0 of device 'goldfish_pipe'
12:53 PM Emulator: deleteSnapshot: for default_boot
12:53 PM Emulator: Process finished with exit code 0
I have looked for similar posts on this website and tried updating HAXM to the latest version, and created a new virtual device, but that has not fixed the problem.
Maybe Android studio is not using the latest HAXM I installed?
I'm very new to using Android studio and developing apps so any help would be appreciated!
EDIT
Here's a picture of the version of my HAXM by going to settings > appearance and behavior > system settings > android sdk > sdk tools
This is a known bug and is fixed in the latest version of android studio.
https://issuetracker.google.com/issues/132481542
You can also try a work around by by changing the cpu core from 4 to 1.
This question already has answers here:
Error in launching AVD with AMD processor
(19 answers)
Closed 6 years ago.
I am getting this error when i tired launching the emulator. Any suggestions?
Cannot launch AVD in emulator.
Output:
emulator: WARNING: VM heap size set below hardware specified minimum of 128MB
emulator: WARNING: Setting VM heap size to 384MB
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAXM must be updated (version 1.1.4 < 6.0.1).
After downloading the Intel HAXM from the android studio, you need to install it. Run the setup from Users*name*\AppData\Local\Android\sdk\extras\intel\Hardware_Accelerated_Execution_Manager\intelhaxm-android.exe
Sadly, this can be installed only on computers with Intel CPU's, so you must have an Intel to run the Android Studio emulator.
Have you tried reinstalling Intel HAXM? To do that follow these steps.
1) Open SDK Manager and Download Intel x86 Emulator Accelerator (HAXM installer) if you haven't.
2) Now go to your SDK directory (C:\users\username\AppData\Local\Android\sdk, generally). In this directory Go to extras > intel > Hardware_Accelerated_Execution_Manager and run the file named "intelhaxm-android.exe".
3) Restart Android Studio and then try to start the AVD again.
It might take a minute or 2 to show the emulator window.
See this link
or this (for Windows, see link for Mac/Linux):
Configuring VM Acceleration on Windows
Virtual machine acceleration for Windows requires the installation of the Intel Hardware Accelerated Execution Manager (Intel HAXM). The software requires an Intel CPU with Virtualization Technology (VT) support and one of the following operating systems:
Windows 7 (32/64-bit)
Windows Vista (32/64-bit)
Windows XP (32-bit only)
To install the virtualization driver:
Start the Android SDK Manager, select Extras and then select Intel Hardware Accelerated Execution Manager.
After the download completes, execute /extras/intel/Hardware_Accelerated_Execution_Manager/IntelHAXM.exe.
Follow the on-screen instructions to complete installation.
After installation completes, confirm that the virtualization driver is operating correctly by opening a command prompt window and running the following command:
sc query intelhaxm
You should see a status message including the following information:
SERVICE_NAME: intelhaxm
...
STATE : 4 RUNNING
...
To run an x86-based emulator with VM acceleration:
If you are running the emulator from the command line, just specify an x86-based AVD:
emulator -avd
Note: You must provide an x86-based AVD configuration name, otherwise VM acceleration will not be enabled.
If you are running the emulator from Android Studio, run your Android application with an x86-based AVD:
In Android Studio, click your Android project folder and then select Run > Edit Configurations...
In the left panel of the Run/Debug Configurations dialog, select your Android run configuration or create a new configuration.
Under the Target Device options, select the x86-based AVD you created previously.
Run your Android project using this run configuration.
You can adjust the amount of memory available to the Intel HAXM kernel extension by re-running its installer.
You can stop using the virtualization driver by uninstalling it. Re-run the installer or use the Control Panel to remove the software.
You need to have the latest version on intel haxm driver installed. You seem to have version 1.1.4 and the latest one is 6.0.1
Here is the direct link to download and install https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager
enable VT-x for your system, get the latest version of haxm here https://github.com/intel/haxm/releases/tag/v7.4.1 update and u are good to go.
(Or you can use the SDK manager to install it like the other answer suggests)
I have a Mac Book Pro - Intel i7. I am trying to create a AVD with the accelerated Intel Options but i get the following error every time i open the AVD.
Starting emulator for AVD 'AVD_for_Nexus_5_by_Google'
emulator: Failed to open the hax module
HAX is not working and emulator runs in emulation mode
emulator: emulator window was out of view and was recentered
AVD Settings
Such error: Windows Solution
Install the HAXM Driver by running "IntelHaxm.exe". It will be located in one of following locations.
..Android\android-sdk\extras\intel\Hardware_Accelerated_Execution_Manager
..adt-bundle-windows-x86_64\sdk\extras\intel\Hardware_Accelerated_Execution_Manager
Go to the directory of extras and run the installation of HAXM. It will solve your problem.
Such error: Mac Solution
Go to this link.
Choose the Intel HAXM installer package for your platform.
Extract the installer and follow installation instructions for your
platform.
I am using Ubuntu 13.10 on a 32 bit machine. Downloaded and installed Eclipse Kepler also 32 bit version in addition of JDK and JRE also 32 bit versions.
I downloaded latest Android SDK (API 19) but when I start Eclipse as user (not su) and try to create AVD, I get this error:
[2014-03-26 21:17:55 - SDK Manager] Error: null
and AVD is not created.
If I start Eclipse as su and attempt the same, I can create AVD but it will never start and I get:
Starting emulator for AVD 'NEX5'
PANIC: Could not open: NEX5
If I try to add already preset AVD "AVD_for_Nexus_5_by_Google, I get error:
/home/username/.android/avd/AVD_for_Nexus_5_by_Google.ini (Permission denied)
Please help. I am also new to Linux, so please provide some explanations.