Related
I am running android emulator in ubuntu-19.10 and I have attempted following solutions with no results,
Link-1
Link-2
Link-3
Error,
1:10 PM Emulator: pulseaudio: pa_context_connect() failed
1:10 PM Emulator: pulseaudio: Reason: Connection refused
1:10 PM Emulator: pulseaudio: Failed to initialize PA contextaudio: Could not init `pa' audio driver
Some notes on solution I tried,
When trying Link-1 i don't see "Qemu-system" in settings. Also created many different versions of AVDs but does seem to work.
After trying Link-2 pulseaudio -D command errors out.
I have also tried Link-3 which looks like widely suggested solution in multiple blog posts. But still I find the same error on emulator startup. I would like to note that I am not smart enough understand this solution.
Thanks in advance for helping out.
Same problem in Ubuntu 20.04, with Android Studio installed from Ubuntu Software. Tried everything (paprefs, this), nothing worked. Uninstall Android Studio Snap and reinstall from tar package downloaded from Android Studio website, works perfect.
I was having a similar issue on Ubuntu 20.04 but I fixed it by uninstalling the store version of Android Studio and following the installation instructions on the Official Android Studio website here: https://developer.android.com/studio/install
If you are running a 64-bit version of Ubuntu, you need to install some 32-bit libraries with the following command:
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
lib32z1 libbz2-1.0:i386
To install Android Studio on Linux, proceed as follows:
Unpack the .zip file you downloaded to an appropriate location for your applications, such as within /usr/local/ for your user profile, or /opt/ for shared users.
If you're using a 64-bit version of Linux, make sure you first install the required libraries for 64-bit machines.
To launch Android Studio, open a terminal, navigate to the android-studio/bin/ directory, and execute studio.sh.
Select whether you want to import previous Android Studio settings or not, then click OK.
The Android Studio Setup Wizard guides you through the rest of the setup, which includes downloading Android SDK components that are required for development.
I had the same issue, runing Intellij on Ubuntu 20.04. I solved it by adapting a solution from this link
I run this:
sudo ln -s /run/user/1000/pulse/native /run/user/1000/snap.intellij-idea-community/pulse
If you're using Android studio, just try to find "snap.intellij-idea-community" will be named differently, referring to your android studio installation.
On Ubuntu, is possible open the emulator with terminal and change the sound in System Preferences. Works with the instant version of Android Studio. It works with the snap version of Android Studio.
First is needed to add the emulator command to the PATH.
This can be done by editing .bashrc or .zshrc. Preferably these lines should be placed at the end of the file.
export ANDROID_SDK_PATH=$HOME/Android/Sdk
export ANDROID_NDK_PATH=$HOME/Android/Sdk/ndk
export PATH="$PATH:$HOME/Android/Sdk/platform-tools"
export PATH="$PATH:$HOME/Android/Sdk/emulator"
The PATH variable needs to be reloaded. This can be done manually, as shown below, or simply by opening another terminal:
source ~/.bashrc
# OR
source ~/.zshrc
Another way is to add adb and android-sdk-platform-tools-common packages to have the emulator command available. Package names may vary depending on the Ubuntu version.
After that, the emulator command can be used to list available emulators:
emulator -list-avds
Example of output:
Pixel_4_API_30
Pixel_C_API_30
Then can be opened one of the available emulators:
emulator #Pixel_4_API_30
Finally, the emulator probably will appear at the System Preferences:
If this is a Snap it's got strict requirements as far as i/o; that said, if the requirements are similar to those of running Androidx86 using Vbox on Debian (I realize Qemu is a different environment, however, this may be of use for both Jbaba as well as future reference. Step one: make sure that you belong to the group Qemu (or the equivalent for Ubuntu/Snap?). Step two: make sure you belong to the group pulseaudio. Step three: make sure that Qemu is explicitly permitted to access whatever your audio output device is and that it's the device that pulseaudio is configured to output to. There should be a fairly intuitive way of seeing this using Qemu (it's been awhile, so I am not able to tell you where to find it). As for pulseaudio; its GUI will show you.
I got crazy while trying to solve this issue but finally, it was solved. I figured out that we have to enable multiple simultaneous audio outputs in order to hear both sounds the emulator and the OS.
The solution is by installing paprefs small app as the following.
1- Install it:
$ sudo apt install paprefs
2- Open it:
$ paprefs
3- Go to the last tab Simultaneous Output and click on the only option there in order to enable the Simultaneous Output.
4- Restart it:
$ pulseaudio -k
5- If it fails then you have to restart the daemon
$ pulseaudio -D
6- Almost finished, go to the system settings and navigate to Sounds options and change the output sounds to the newly added one as below.
OS : Ubuntu 20.04.
Android studio (snap).
I tried all the methods, none worked for me.
By installing these libs, the sound works now.
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
as Gigi mentionned before
I am using Expo XDE version 16.0.0 and I would like to test my app in the Android emulator. I am on a mac. I have installed Genymotion and have started the emulator as the expo.io (https://docs.expo.io/versions/v16.0.0/guides/genymotion.html) docs describes but I get the following error. I have no idea of what it means or how to fix it.
Couldn't start project on Android: could not install smartsocket. listener: Address already in use ADB server didn't ACK * failed to start daemon * error: cannot connect to daemon
I hope someone can help me on this one?
In my case the solution was this on an Ubuntu 17.04
sudo apt remove android-tools-adb
adb kill-server
adb start-server
it's possible you have adb and android-tools-adb installed
After having spent a day figuring it out, I decided to go with using the Android emulation within genymotion. This is for Ubuntu (16.04).
Download Android Studio & go into Tools > Android > AVD Manager.
Download the SDK for whichever device & Android version you are going
to use.
Once downloaded, test the emulator is functional by clicking
on the green play icon under 'actions' (far right in Virtual Devices
screen).
Open genymotion, settings > ADB > 'use custom Android SDK
tools'. Select folder /*/Android/Sdk (wherever Android sdk is
installed)
Test by clicking on 'Start' in main genymotion screen.
Open Expo XDE, load up the project & 'ctrl+d' to load on android
device. It will start the installation of expo app.
vividresponse here worked for me even on linux (he made it on OSX and I see it works for windows too).
Basically, you must check the versions of adb. Like:
adb version
And (using you real path)
/opt/android-sdk/platform-tools/adb version
If they differ, replace /usr/bin/adb (first one) with the second one.
Other important things are that you must set the correct genymotion SDK. And make sure sdk & sdk tools must be present in the PATH variable.
After updating my Android SDK tools today to 25.3.1, the emulator won't run anymore.
I can open the AVD Manager. When I hit "Play" on one of the emulators on the list, I see the bar below on Android Studio
But then after the progress bar reaches the end, nothing happens.
I see in the release notes that the latest update brought changes to the emulator so I'm wondering if that's a bug or I'm missing something about that.
I'm using Android Studio 2.3.
Any ideas?
I ran into the same problem after upgrading. I can't figure out what's causing the configuration problem but I did figure out a workaround.
First, I tried to launch the emulator from the command line:
$ emulator #<name_avd_image>
emulator: ERROR: This AVD's configuration is missing a kernel file! Please ensure the file "kernel-ranchu" is in the same location as your system image.
emulator: ERROR: ANDROID_SDK_ROOT is defined (<android>/sdk) but cannot find kernel file in <android>/sdk/system-images/ sub directories
You can get more information if you run emulator with the -verbose flag. I tried re-installing the system image (e.g. Android API 25 x86 w/ Google APIs), Android Emulator 25.3.1, and re-creating the AVD but nothing worked.
Finally as a workaround, I just copied all of the system files from the SDK system images directory into the AVD directory:
Example: Pixel XL (Android API 25 x86 w/ Google APIs)
SOURCE: <android>/sdk/system-images/android-25/google_apis/x86/
DESTINATION: ~/.android/avd/Pixel_XL_API_25.avd/
After that the emulator started right up. It's not ideal, but this was blocking my development so I had to get the emulator up and running again. I hope someone else will be able to figure out what broke in the configuration.
UPDATE: Figured out the configuration problem!
I noticed I periodically was seeing the console error "Your emulator is out of date, please update by launching Android Studio:" so I decided to check:
$ which emulator
<$ANDROID_SDK_ROOT>/tools/emulator
With help from this thread:
The problem is there are two emulators: one in
$ANDROID_SDK_ROOT/tools, another one in
$ANDROID_SDK_ROOT/emulator. The one in $ANDROID_SDK_ROOT/tools
cannot start. Place $ANDROID_SDK_ROOT/emulator before
$ANDROID_SDK_ROOT/tools in your $PATH variable, it should fix the
problem.
NOTE: For most Mac users, you can edit your ~/.bash_profile to change these settings and then run $source ~/.bash_profile to load the updates. In my particular case, I also had old values for $ANDROID_HOME that I had to clear out.
The real problem, at least over Ubuntu 16.10 and 17.04 and Andoid Studio 2.4 Preview 7 (but could happen with any Debian derivative and previous versions of Android Studio), is that Google is distributing a non working libstdc++ library with the emulator tools. They're distributing 6.0.18 version, but i found that the working one is 6.0.22.
EDIT: There are reports that 6.0.21 version of libstdc++ works as well as 6.0.22.
So, you have 2 options:
Option 1
rm the previous non working Google's libs in /yoursdkpàth/emulator/lib64/libstdc++
Download and extract libs from libstdc++ official package in /yoursdkpàth/emulator/lib64/libstdc++
Don't try to install the .deb, extract the files/binaries from inside it (the 2 binaries are in a folder named "lib") and manuallly copy them on the recommended path.
Option 2
Create a simlink to the lib distributed with Ubuntu, which already is 6.0.22 version
cd ~/Android/Sdk/emulator/lib64/libstdc++/
mv libstdc++.so.6 libstdc++.so.6.bak
mv libstdc++.so.6.0.18 libstdc++.so.6.0.18.bak
ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ~/Android/Sdk/emulator/lib64/libstdc++/libstdc++.so.6
ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22 ~/Android/Sdk/emulator/lib64/libstdc++/libstdc++.so.6.0.22
IMPORTANT 1: As Google seems to be not aware of the problem, on every update they make to the Android Emulator package in Android Studio, they break the funcionality replacing your working SDK C++ libs with the broken/older ones. The solution is to repeat any of the above procedures.
IMPORTANT 2: This is only valid if your AVDs are configured for use your PC GPU as host for video accelaration (Hardware GLES 2.0). Selecting Sofware GLES 2.0 on your AVD will work without any of the suggested changes, but your emulator will turn painfully slow.
Have you check the Android emulator installed in the **SDK Tools?
Go to Setting-> sdk-tools.
See whether Android is installed or not.
I have face same problem. when I checked the SDK Tools, I found that the Android emulator was not installed.
The libstdc++.so.6 is the cause (as pointed out by #doruMarinau); Android Studio 2.3 moved the file to a new folder your_sdk/emulator/lib64.
If using Linux, create a symlink for it:
$ ln -sf /usr/lib/libstdc++.so.6 /your_sdk/emulator/lib64/libstdc++/libstdc++.so.6
The solution is:
Tools - Android - Sdk manager
tab Sdk tools
install emulator 25.3.1
This worked for me:
Go to AVD Manager, then, in the Actions column, click on the arrow that points dawn and select "Wipe Data".
After this, try to run the emulator.
It’s a libGL error and libstdc++ issue. Cannot launch AVD in emulator.
It’s a know bug and you can easily beat it with some simple steps.
I have tested this solution on a Ubuntu 16.10 64bit
Solution:
$adb kill-server
$adb start-server
After this start your emulator from the Android studio. If this doesn't work then go ahead for the next solution.
Alternative solution:
First, install some packages and libs:
$sudo apt-get install lib64stdc++6:i386
$sudo apt-get install mesa-utils
Second, tweak some links:
$ cd YOURPATH/Android/Sdk/tools/lib64
$ mv libstdc++/ libstdc++.bak
$ ln -s /usr/lib64/libstdc++.so.6 libstdc++
Third, relaunch your AVD device and test it.
Go to Sdk/emulator/lib64/libstdc++ move libstdc++.so.6 and libstdc++.so.6.0.18 to myfolder (I created this) (or any other location) as backup and copy libstdc++.so.6, libstdc++.so.6.0.21 from usr/lib64; try again to launch your virtual device.
It's been driving me nuts for the last few days. Here's what worked for me:
ANDROID_HOME, ANDROID_SDK_ROOT variables in "System Environment Variables" were different from Android Studio -> Settings -> Android SDK Location. So when I changed the environment variables, AVD started!
(After changed the environment variable, you should restart the Android Studio)
The only solution which worked for me, was to install following missing libraries:
$sudo apt-get install lib64stdc++6:i386
$sudo apt-get install mesa-utils
Once you have them, update the one there in sdk's emulator with these as following:
$ ln -sf /usr/lib/libstdc++.so.6 /home/[YOUR_SYSTEM_USERNAME]/emulator/lib64/libstdc++/libstdc++.so.6
Launch your emulator again and it will work just fine.
As of this release, the Android Emulator will be released separately from the SDK Tools.
so just install android Emulator using sdk tools in your android studio
My problem was ANDROID_SDK_HOME pointing to d:\.android instead of d:\. Could not find the images anymore.
I am new to Android Studio and I am having problems while using the emulator. When I try to run it keeps crashing saying:
"Cannot launch AVD in emulator" [6816]:ERROR:./android/qt/qt_setup.cpp:28:Qt library not found at
C:\Users\Jay\AppData\Local\Android\Sdk\emulator\lib64\qt\lib
Could not launch 'C:\Users\Jay\AppData\Local\Android\Sdk\emulator/qemu/windows-x86_64/qemu-system-i386.exe':
No such file or directory
I have enabled VT-x from BIOS settings yet I am having the problem. I have searched a lot and cannot find an answer. Any help will be much appreciated. Can anyone give me a solution?
Screenshot of error
This seems to be an issue relating to the recent update. A temporary solution is to launch emulator from within the /path/to/android-sdk/tools directory in the commandline.
See https://code.google.com/p/android/issues/detail?id=235461 to follow the issue.
All other answers did not work for me as "Android Emulator" was not installed with a standard installation of Android Studio. Make sure you have installed it and then try other answers if required.
For Linux or Mac systems you can add the following to ~/.profile (or ~/.bashrc):
function emulator { cd "$(dirname "$(which emulator)")" && ./emulator "$#"; }
then run to load the changes:
source ~/.profile
(or source ~/.bashrc of course)
This will allow to execute emulator until they fix the issue
(based on #10 yanokwa comment from https://code.google.com/p/android/issues/detail?id=235461)
I've installed the latest Android Emulator 26.1.2 which has solved this problem.
Btw if in your PATH you have both of this:
C:\AndroidSDK\tools
C:\AndroidSDK\emulator
The emulator command will try to use the emulator.exe inside the tools folder, which is not working.
To solve this in your PATH you need to move C:\AndroidSDK\emulator
in the line before the tools directory, in this way the emulator
executable will be searched inside the emulator folder first and will
take precedence over the one present in the tools folder
MacOS:
If you have a Mac you can move
~/Library/Android/sdk/emulator before
~/Library/Android/sdk/tools
a simple solution is to add this alias to your .bashrc .profile or equivalent
alias emu="$ANDROID_HOME/tools/emulator"
then source .bashrc or .profile or just simply open a new terminal
finally running your emulator will be as simple as emu -avd name
Zsh users can add:
function emulator { ( cd "$(dirname "$(whence -p emulator)")" && ./emulator "$#"; ) }
to .zshrc (or .zshenv).
Load changes to current shell by sourcing changed file:
source ~/.zshrc
Now you can use emulator command in zsh.
Thanks to J. Costa for his answer for bash.
I had same problem with latest Android Studio installed just yesterday on Macbook.
Though the emulator binary was available in the sdk/tools folder, Android Emulator package wasn't installed. Selecting Android Emulator in Android Studio->Preferences->System Settings->Android SDK, downloaded the emulator package and installed it.
After the emulator installation, I am able to launch the emulator.
First of all, the issue thread on Google Issue Tracker was already resolved. You don't have to set environment variable like LD_LIBRARY_PATH as a workaround any more. But you have to upgrade your Android SDK and use the LATEST emulator package (binaries). Without having that, you'll still see the annoying QT errors.
Then, it's crucial to make sure that the required SDK packages are installed to launch an emulator. When installing a specific emulator image by sdkmanager, it won't check or ask you to install required dependencies. Whenever you see error complains about ANDROID_SDK_ROOT, such as PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT or PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value, it's exactly because of that.
So the 3 other essential dependencies apart from the emulator image are:
platform-tools
platforms;android-<api_level>
emulator
Which you can install via:
sdkmanager "platform-tools" "platforms;android-<api_level>" "emulator"
The api_level is the same API level your emulator image is.
For those who are still experiencing the issue even when performing the command from .../Sdk/tools directory, try adding the -use-system-libs argument.
So it should be in the following format:
path/to/Sdk/emulator -use-system-libs -avd [AVD-NAME]
For me, here is an example:
/home/cillian/Android/Sdk/emulator -use-system-libs -avd Nexus5
I had the same problem and I solved it by installing the emulator cause somehow the updates seem to have deleted it. Do that from Android Studio tools-> SDK manager. Hope this helps
I see that you should only add below into the path to be able to launch emulator
C:\Users\Ram\AppData\Local\Android\Sdk\platform-tools
C:\Users\Ram\AppData\Local\Android\Sdk\emulator.
After installing Android Studio 3.0 and higher, I see that C:\Users\Ram\AppData\Local\Android\Sdk\emulator has same files as C:\Users\Ram\AppData\Local\Android\Sdk\tools
The tools folder is missing some files, so remove the tools folder from path.
You can use below emulator commands to launch emulator from command prompt:
emulator -list-avds
emulator #Pixel_2_XL_API_26 - Based on the avd that you have setup
I have installed Android Studio 2.3.3 (today 2017-08-01) on windows 10 x64
Same issue.
I have manually installed emulator from Android Studio -> Tools -> Android -> Sdk Manager -> SDK Tools -> Android Emulator (version 26.1.2)
After installation ... same issue
I have added my path from emulator folder to my environments variables before tools path (like as one answer above) but still same issue.
Then I have deleted emulator.exe and emulator-check.exe from tools folder and this solved for mi the issue
Follow these steps to resolve that problem (Windows 10):
Check in Android studio if you installed Android emulator, if not, install it.
Check in Android studio if you installed Intel x86 Emulator Accelerator (HAXM installer), if not, install it.
In Environment variables => System variables edit "Path". You need to add this line for emulator: %ANDROID_HOME%\emulator before %ANDROID_HOME%\tools and %ANDROID_HOME%\platform-tools (The third step was a solution for me.)
For Mac
If have create emulators, try this shell code:
#!/bin/bash
cd /Users/***/Library/Android/sdk/tools/
avds=`emulator -list-avds`
echo "show All emulators"
i=0
for item in $avds
do
echo [$i] $item
let i+=1
done
read index
avds=($avds)
# echo ${avds[$index]}
emulator -avd ${avds[$index]}
*** is your user name
This problem seems to be fixed in Cordova version 7.0.X
If you are using Cordova version 6.5.0 you can fix it easily.
The root of the problem is in the emulator.js file located from the root of your project directory at ./platforms/android/cordova/lib/emulator.js
Simply update the following line, (for me it was line 205):
.spawn('emulator', args, { stdio: 'inherit', detached: true})
to
.spawn('emulator', args, { stdio: 'inherit', detached: true, cwd: process.env['ANDROID_HOME'] + '/tools'})
This will fix the relative path issue your are experiencing.
Also, there is a second fix needed for the Cordova version 6.5.0 on line 56. Simply drop the letter "s" from the word "avds" plural, to make it "avd" singular.
I was facing this issue
java.io.IOException: Cannot download
'https://dl.google.com/android/repository/emulator-windows-4266726.zip'
I updated to studio 3.0 in windows 10, my emulators stopped working.Things I did for fixing,
Deleted previous installation folders of android studio like 2.0 and 2.1 present under my username alongside .AndroidStudio3.0 folder(leaving it untouched).
Deleted previously installed emulators which any way stopped working.
Downloaded the emulator zip file manually from the link above.
Pasted its contents in emulator folder of
C:\Users\myusername\AppData\Local\Android\Sdk\emulator
Created a new emulator and started it, Bingo! it is working!!
My android studio is in the windows operating system. but most of the answers in this page do not work for me.
but I figure it out with an easy way.
In your android studio IDE, open the [Sdk manager], check if you have downloaded the [Android Emulator] and [Android SDK tool]
How to check them?
[SDK Manager] -> [Appearance & behavior] -> [System Setting] -> [Android Sdk] -> There are tabs here and choose the second one [SDK tools]. then check [Android Emulator] and [Android SDK tool].
Hope that it can help you.
Good luck!
I just solved this issue for headless emulator scenario So If I checked my andrdoid_sdk folder there are 2 executable emulator. The issue is sitting one the version
${ANDROID_HOME}/emulator/emulator
version 29.3.4
no issue
and the second one is
${ANDROID_HOME}/tools/emulator
version 26.0.3
QT issue
so make sure you're using latest emulator version especially if you need headless emulator as stated on : https://androidstudio.googleblog.com/2019/02/emulator-2818-canary.html
cd $ANDROID_HOME/tools then emulator --avd #whatever_name_it_is
It seems I was having same problems with emulator in tools folder and AS 4.1.1. A quick solution that I've found for Mac users to work with the new emulator of the emulator folder is to specify the whole path to it:
~/Library/Android/sdk/emulator/emulator <device> <flags>
I was trying on Mac and facing the similar challenge. Mistakes I was doing, is adding PATH before to ANDROID_HOME which should be come at the end. Below is my zshrc file which worked.
export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home
export ANDROID_HOME="/Users/rohitmandiwal/Library/Android/sdk"
export PATH=$ANDROID_HOME/emulator:$PATH
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/tools/bin:$PATH
Installing Android emulator will solve the issue as this setting is not by default enabled in android studio. In android studio 3+ onwards you cannot find it under Tools-->Android-->Sdk Manager -> SDK Tools -> Android Emulator but it's under File-->Settings-->Appearance &Behavior-->System Settings-->Android SDK-->SDK Tools-->Android Emulator
I manage to solve this error. In my system varible i need to set ANDROID_HOME
For my User variable i need
both these path
C:\Users\tonyhudson\AppData\Local\Android\Sdk\platform-tools
C:\Users\tonyhudson\AppData\Local\Android\Sdk\emulator
Remember to delete C:\Users\tonyhudson\AppData\Local\Android\Sdk\tools because it will cause the error
When you have installed only Android SDK and not Android studio. You need to find out the path of the emulator and execute with full path. For example,
/usr/local/share/android-sdk/tools/emulator #test
This should resolve your problem. At least this is what worked for me.
I added the following to my ~/.zshrc file and it worked. (M1 Pro Macbook)
export ANDROID_HOME=/Users/$USER/Library/Android/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/Contents/Home
export PATH=$ANDROID_HOME/emulator:$PATH
Remember to do source ~/.zshrc after editing it.
My problem turned out to be that I was running VirtualBox at the same time as the emulator. For anybody else running into this problem, have a look here: Android emulator and virtualbox cannot run at same time. Hopefully one of the answers will give you a working solution.
You can also just open the Tools > AVD Manager from Android Studio and start the emulator manually.
There can be the bugs / updates happened in the underlying OS. So, instead of updating in .profile, /etc/environment, or .bashrc file to point adb, emulator etc, put (copy and paste) all the emulator folder inside /usr/bin directory. This /usr/bin is by default pointed by the system. Install adb tool from the terminal. This should solve everything.
And/Or, update your all environment variables in /etc/bash.bashrc file. Note that: /etc/bash.bashrc file is what gets executed everytime you open the bash terminal.
If you're using a Docker container which is running a Ubuntu x86 image, it may not be possible to run an x86-based emulator within the Docker image. You will either get the "Qt library not found" error or the "Please ensure KVM is properly installed and usable" error (more info here).
An alternative is to use an ARM-based emulator, which are easier to run, although they are slower:
# Download an ARM emulator image
android-sdk/tools/bin/sdkmanager "system-images;android-24;default;armeabi-v7a"
# Create an ARM-based emulator AVD with 250 MB SD card
avdmanager create avd -n Android_7.0_API_24 -k "system-images;android-24;default;armeabi-v7a" -c 250M --force
# Check the image is properly created and available to run
android-sdk/emulator/emulator -list-avds
# Run the emulator
android-sdk/emulator/emulator -avd Android_7.0_API_24
More info: https://medium.com/#AndreSand/android-emulator-on-docker-container-f20c49b129ef
A solution that worked for me that I've not seen here before is to link android-sdk/emulator/emulator to android-sdk/tools/emulator.
Dumb? Genius? worksforme.
I found tons of answers to this question for Windows, but my problem is on linux (ubuntu). I just downloaded the adt bundle, launched eclipse and tried to start an emulator from the Virtual Device Manager, but I am getting the message
Starting emulator for AVD 'AS'
PANIC: Could not open: AS
I tried to run both as root or not root without success.
Thanks
Dont use ./emulator -avd {AVD NAME} as a super user...Try using it without root it worked for me..for more details see this link
I just had the same problem. Turns out I didn't have proper permissions on my Eclipse ADT Bundle.
Try:
sudo chown -R username adt-bundle-linux-x86_64****
Make sure you have permissions on your workspace too...
sudo chown -R username Workspace
Then you should be able to launch Eclipse as non-root and run the AVD just fine.
If you are running a 64-bit distribution on your development machine, you need to install the ia32-libs package using apt-get::
Open terminal and type the following
sudo apt-get install ia32-libs
For more information check the link below
http://developer.android.com/sdk/installing/index.html
I guess android sdk is 32 bit so you need ia32-libs if you are running on 64 bit machine
Edit:
You can try this
open terminal
and type
sudo chmod -R 777 'YOURPATH of sdk folder(Just Drag and Drop your Android sdk folder here)'
This will give read write and execute permission
you could try piecemeal install
eclipse download - no bundle
sdk download install
adt
I use ubuntu 12.04 and eclipse 4.3 and all is OK.
Ubuntu Android Emulator Problem [Solved]
The issue with android emulator is not the hardware drivers. It is OpenGL drivers. To solve it please go through these steps:
Open synaptic package manager (If not please install it from Ubuntu software center)
In Quick filter type “opengl” and press search.
Select the following packages:
libgles1-mesa-dev
libgles2-mesa-dev
libgles1-mesa
libgles2-mesa
libqt4-opengl [Update/Upgrade]
glmark2
glmark2-es2
libgles1-mesa-dbg
libgles2-mesa-dbg
freeglut3
libhugs-opengl-bundled
Selection procedure
Right click on the package and select as ‘Mark for Installation”.
And click ‘Apply’.
Enjoy the ANDROID PROGRAMMING WITH THE EMULATOR.
I found that chown ~/.android as well as chowning the ADK directory worked for me (ubuntu 12)