Unable to run Android Virtual Device Manager "android avd" getting NullPointerException - android

Getting NullPointerException when trying to start avd. I just downloaded the ADT bundle for Mac and ran android avd. Anyone know why it would fail?
$ ./android avd
java.lang.NullPointerException
at com.android.sdklib.internal.avd.AvdInfo.getDeviceName(AvdInfo.java:158)
at com.android.sdkuilib.internal.repository.ui.DeviceManagerPage.fillDevices(DeviceManagerPage.java:497)
at com.android.sdkuilib.internal.repository.ui.DeviceManagerPage.fillTable(DeviceManagerPage.java:357)
at com.android.sdkuilib.internal.repository.ui.DeviceManagerPage.createContents(DeviceManagerPage.java:259)
at com.android.sdkuilib.internal.repository.ui.DeviceManagerPage.<init>(DeviceManagerPage.java:130)
at com.android.sdkuilib.internal.repository.ui.AvdManagerWindowImpl1.createDeviceTab(AvdManagerWindowImpl1.java:210)
at com.android.sdkuilib.internal.repository.ui.AvdManagerWindowImpl1.createContents(AvdManagerWindowImpl1.java:193)
at com.android.sdkuilib.internal.repository.ui.AvdManagerWindowImpl1.open(AvdManagerWindowImpl1.java:133)
at com.android.sdkuilib.repository.AvdManagerWindow.open(AvdManagerWindow.java:94)
at com.android.sdkmanager.Main.showAvdManagerWindow(Main.java:369)
at com.android.sdkmanager.Main.doAction(Main.java:311)
at com.android.sdkmanager.Main.run(Main.java:119)
at com.android.sdkmanager.Main.main(Main.java:102)

The following worked for me:
From the command line I navigated to the tools folder of the Android-SDK folder. From there I ran this command:
android list avd
This produced a list of all of my virtual devices but one of them showed itself to be the problem. The exact output was as follows:
The following Android Virtual Devices could not be loaded:
Name: Tab31
Path: /Users/User/.android/avd/Tab31.avd
Error: Failed to parse properties from /Users/User/.android/avd/Tab31.avd/config.iniere
If you see this then make note of the "Name" property ("Tab31" in my situation) and run the following command (obviously replacing the name of my AVD with yours):
android delete avd -n Tab31
After that I was able to start the AVD Manager without any problem.

I had this exact same problem last night and finally found the ways to get the emulator to start working:
List the available targets with: android list targets
android create avd -n {name} -t {targetID}
(for {name} I chose Tablet - believe its arbitrary)
== Still wasn't working but then I discovered =>
I right-clicked above the manifest.xml file, selected option Run As ->
Run Configurations -> on a tab Target, and selected AVD created.
(from Eclipse launch error when trying to run an Android app)

If nothing of the above solutions work, deleting the .android folder in the home directory will work

I had this same problem after moving around my Android SDK and changing the base directory by setting the environment variable ANDROID_SDK_HOME. Turns out there is a path inside of the following file (path below ANDROID_SDK_HOME).
.android/avd/nameofphone.ini
The "path=" setting in that file is absolute, so if you move around your files it will not be correct anymore. Changing that to the correct absolute path to the avd-file in the same directory fixed my issue.

It's usually because creation of a new AVD failed or the configs for one of your AVDs is corrupted.
Go to ~/.android/avd
Check the list of AVDs. If you think one of those AVDs is causing the problems, sudo rm -r (UNIQUE PART OF AVD NAME)*
This removes that AVD. Then re-try android avd
#BreakingBad's solution works fine except when the config is corrupted

It looks like this issue has been fixed in version 21.0.1 preview 1 of the SDK Tools.
http://code.google.com/p/android/issues/detail?id=40400
The most likely cause is an invalid properties file that could not be parsed by the AVD Manager. Updating to the Preview Channel of the SDK Tools should fix this, or you can just wait for the official release.
Once I updated, the AVD Manager started and showed an invalid AVD in my list, which I was able to delete.

Related

Cannot launch AVD in emulator:QT library not found

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.

When starting eclipse using sudo, avd is stored in the wrong folder

In order to get eclipse to run properly on Ubuntu 14, I need to start the program using sudo eclipse.
I create an AVD and it stores it in the folder: /root/.android/avd/test.avd
But when I try to start the avd through the AVD manager I get the following error:
Starting emulator for AVD 'test'
PANIC: Could not find test.ini file in $ANDROID_AVD_HOME nor in $HOME/.android/avd
So, eclipse is looking for the AVD in the wrong folder. I tried a variety of ways around this, but it seems that it should not be that hard to just get eclipse to look in a different folder for the AVD, or to change the folder that the AVD is created in.
Apart from when you are updating Eclipse or installing new packages in Eclipse, you do not need to start Eclipse as sudo to develop an android app. Change the owner of the folder that Eclipse is stored in using sudo chown <non-root-user> -R <installation-directory-of-Eclipse> so it gets the avd from the correct folder or better still, change the permissions of Eclipse's installation folder using chmod.

Is this Android Studio bug or am I doing wrong?

I have android studio setup on my Ubuntu machine and now whenever I try to start the emulator, it throws exception like:
Cannot launch AVD in emulator.
Output:
PANIC: Could not find
Nexus_S_API_21.ini file in $ANDROID_AVD_HOME$ nor in $HOME./android/avd
So when I do:
echo $ANDROID_AVD_HOME
It shows empty which means that this path is not set and when $HOME is my /home/user
So when I go in /home/user/.android/avd there is really no .ini file. So, I am confused, when I create a virtual device, where does it go? How can I find the path where virtual devices are being created and if possible, how can I change the path to create virtual devices?
You can find location of your avd's *.ini files in AVD Manager (GUI).
Right under tab "Android Virtual Devices" there is line "List of existing Android Virtual Devices located at %here is the location%".
You can try to change system variable %android_avd_home% to something like /home/user, for example and then restart IDE (Android Studio).
Also, you can try to find useful information here: https://code.google.com/p/android/issues/detail?id=78577
Hope it helps
I experienced this same issue on OSX, but the weird part was it only happened after I had added the ANDROID_SDK_HOME varible to my environment.
I experimented and found that if I added the ANDROID_AVD_HOME variable to my environment or I removed ANDROID_SDK_HOME, it caused it to start working.
One solution at this problem is to copy the file's emulator which exited and rename it in the name of the new emulator; that is say the android studio name of emulator who is try to run.
NB : Before I suppose you had install the eclipse ADT which contains one or some emulator
Example :
1) cd .android/avd/
2) ls -al
3) cp .ini .ini
4) Finish run the emulator in your android studio by the AVD
This happens on Windows when the user home folder is changed from the default one. To make Android Studio happy just add a system enviroment variable and set it to your home folder, for example:
ANDROID_SDK_HOME = D:\Users\max\

Failed to create sdcard in the AVD folder on Mac 10.7.5

I'm using Mac OSX 10.7.5 and I recently re-install the newest ADT 23 which version named "adt-bundle-mac-x86_64-20140624".
I removed the older version of ADT which only support to API 18 (I don't remember what the version code is it...) before install the new one.
While I completed installation, update API to 19 by SDK Manager, but I haven't updated 4.4W and API 20.
I tried to create a new emulator with the setting value on SD Card field, and then press OK.
The console panel would occurred error message:
[2014-07-09 02:44:13 - SDK Manager] Failed to create the SD card.
[2014-07-09 02:44:13 - SDK Manager] Failed to create sdcard in the AVD folder.
With the same creating steps, the problem above haven't displayed in the older version of ADT that I used before.
I tried if I don't set SD card value to create a new emulator, that can be created successfully!
I also tried to install Eclipse 4.4 Luna and the newest SDK package separately, it still has the same problem...
I'm not sure if there's any problem on my OSX or have I missed any steps of settings during installation.
Please kindly give me some suggestions to fix my problem, appreciate!
It's been 2 months since you've opened this case, so I hope that you've reached a resolution by now. I've actually experienced the same issue with creating an SD Card on my Mac 10.7.5 OS using the Eclipse ADT Bundle. When I couldn't rely on the GUI, I moved over to using the CLI for creating the sdcard using the mksdcard command located in the sdk/tools folder (ex: mksdcard 64M /tmp/sdcard.img). In doing so, I noticed that I was receiving an Illegal Instruction: 4 error. When tracking this error down further (ex: What is the "Illegal Instruction: 4" error and why does "-mmacosx-version-min=10.x" fix it?) I noticed that it's an issue with the way that the mksdcard command was compiled and that my 10.7.5 OS was not capable of executing this command.
Resolution (at least for my case):
Backup the mksdcard command in the tools folder. Example cp
mksdcard mksdcard.bak
Download a previous version of the tools that were known to work on the 10.7.5 OS (http://dl-ssl.google.com/android/repository/tools_r22.6.2-macosx.zip)
Extract the tool and copy the mksdcard command from the newly extracted folder to your Eclipse/sdk/tools folder (essentially replacing the mksdcard command that we know doesn't work).
Restart Eclipse
Create a new AVD using the AVD manager and assign a value (ex: 32M) for the sdcard
You should no longer see the failed to create sdcard error.
Resolution 2:
Update your Mac to a later version (10.8.x or above). I've tested this and have confirmed that mksdcard is working on later versions of Mac OS X without this issue.
Let me know if this resolves your issue as well.
You can try run this in shell
cd /Users/MyUserName/Library/Android/sdk/tools/
chmod +x mksdcard
Android Studio IDE on Mac os:error=13, Permission denied
in my case , i just update android Emulator.
SDK Manager -> android sdk -> sdk tools.
update Android Emulator
I think there's a bug in the GUI that's not letting you past the SD card step. You could try skipping the GUI by using the 'android' command directly. After experiencing this problem, I was able to create an AVD using this command:
$ android create avd -t 3 -n TestAVD
This uses a lot of defaults. To see options for '-t', use 'android list targets'. Take a look at the options for 'create avd' with this command:
$ android --help create avd
Hope that helps.

AVD - PANIC: Could not open... - not a path issue

I want to write an Android app and I've started this morning by loading JDK, eclipse, SDK etc, all from the adt-bundle-windows-x86_64-20130219 from http://developer.android.com.
The issue for me right now:
[2013-02-27 13:36:26 - Test2] Android Launch!
[2013-02-27 13:36:26 - Test2] adb is running normally.
[2013-02-27 13:36:26 - Test2] Performing com.example.test2.MainActivity activity launch
[2013-02-27 13:37:27 - Test2] Launching a new emulator with Virtual Device 'droidX2'
[2013-02-27 13:37:27 - Emulator] PANIC: Could not open: droidX2
I've been sifting though posts on the web all morning about AVD and I haven't seen one that didn't involve the path being messed up and the .ini not found. I don't think I've got a path issue. AVD is looking for files on D:\USERS\XXX\.android\avd and that's where the files are. So don't understand why the emulator can't open.
I've done the most basic things like remove and re-install everything, read the notes at orace etc. Basically I'm stuck. Any suggestions here?
adt-bundle-windows-x86_64-20130219 was what I loaded on Windows 7 (32bit).
I'd settle for testing on the mobile that's connected to the PC but I can't get that to work either!
Any direction appreciated.
This has been asked a few times already, try these:
Create a environment variable called: ANDROID_SDK_HOME and set it to
C:\Users\Administrator Open Eclipse > Window > Preferences and click
in Run/Debug and String Substitution Add a new variable called:
user.home and set it to C:\Users\Administrator Create an AVD and run
it.
Original answer by Colin
an android project member says here:
As a work-around, you can define the environment variable
ANDROID_SDK_HOME to point to the directory containing your .android
directory. The emulator and SDK Manager will pick it up properly.
verify that The location in which the avd was searched from is different from where it is actually created. Take a look at the screenshot below for more information.
ANOTHER OPTION: Symlinking...
In a command prompt (with admin privileges), change directory ("cd") to "C:\Users\YourUserName.android" and then use the following command to create a symlink to the avd directory (notice the direction of the slashes):
mklink /D avd D:\_MyLibrariesDir\.android\avd
Where "_MyLibrariesDir" is the directory that your libraries (photos, documents, etc) folders are located.
And you're done!
Explanation: This has the same effect as the ANDROID_SDK_HOME option except that you can now browse to [C:\Users\YourUserName\.android\avd\*] and [D:_MyLibrariesDir\.android\avd\*] and both will take you to the same spot.
This differs from a shortcut in that shortcuts do not act as directories, so if you just had a shortcut to the "avd" folder, you could not go to "C:\Users\YourUserName\.android\avd*" as it would produce a file not found error and if you tried to click on an avd shortcut file it would take you to [D:_MyLibrariesDir\.android\avd\*] instead of keeping you on the C drive. Symlinks act a bridge between locations in a way that is transparent to user and software. Quite handy :)
I fixed the AVD Panic issue by running Eclipse as an administrator.
On Ubuntu check the current user if you run eclipse as root (sudo) eclipse could NOT find the /root/.android set the user home
user.home /home/<user>/
and copy the AVD files into the new directory than changes the privileges
cd /home/<user>/
chgrp <user> -R .android
chgrp <user> -R .android
Simply if nothing works for you, just copy the folder avd which you could find in your .android folder to C:\Users\<user name>\.android.
Pls check once in Ur ".android" folder, another/duplicate ".android" folder might have been created. If "YES" is Ur answer then do this thing because in my case that thing was happened.
Simply I just kept only the latest ".android" folder in this directory "C:\Users\USER NAME\" (removed the duplicated one) and then emulator started working for me.
Cheers
try to add new windows admin user with English language only
it worked for me
the user name should be in English letters
Found a simple way to make it work - worth trying:
1. If you do not have it yet - create a new AVD with the problematic name (in this case droidX2) if you see an overwrite warning - overwrite it.
2. Delete the new AVD you just created in step 1.
3. If you have another AVD it's OK, if not - create one.
4. Retry running the Eclipse project as an Android application - now it should run
Setting the ANDROID_SDK_HOME environment variable alone works fine for Win7 and earlier but did not help me on Win8.
For poor tortured souls using the piece of crap which is Windows 8, go to wherever you've installed the Android SDK (e.g. C:\SDK\Android or C:\Users\JoeCitizen\AppData\Local\Android\android-sdk) and make sure both AVD Manager.exe and SDK Manager.exe are set to run as Administrator for all users. Once I did that it worked fine.
Yet another deceptive problem-which-shouldn't-be-a-problem caused by the complete fail which is permission management circa Windows 8.
Using Windows 7, Eclipse, Android SDK tools 23.0.4
First time I followed the exact instruction on http://developer.android.com/training/index.html
I got the error "PANIC: could not open.." whenever 'Start' emulator.
Solution: System property popup/Enviroment Variables/ System variables, Added new entry
name="ANDROID_SDK_HOME", value = "D:\DATA\Users\ThisUser\"
Then it starts work!
"D:\DATA\Users\ThisUser\" is parent folder where ".android/avd" folder exists.
avd folder path here is "D:\DATA\Users\ThisUser.android\avd"
Note that you must put "D:\DATA\Users\ThisUser\", not "D:\DATA\Users\ThisUser**.android**"

Categories

Resources