Reputation: 7635
everybody,
I am facing a weird problem in mac osx. I have installed eclipse(Indigo 64 bit) on my mac machine with ADT r15. and android sdk with API level 7. everything works fine but when i create a virtual device and launch it, i always get error
PANIC: Could not open: /tmp/.android/avd/avd_2.1.ini`
The problem is that eclipse looks for avd at location /tmp/.android/avd/
but avd is actually located at /var/root/.android/avd.
Is there any workaround.
Thanks
N_JOY
Upvotes: 2
Views: 1695
Reputation: 11
I encountered the same problem but I was able to managed it though.
What I did is that I copied the contents of .android folder (from the root -- /var/root/.android) to the tmp (/tmp/.android).
Since in MAC OS you cannot create/open folder that name's start from a dot (e.g. -- .android folder), you have to do it manually using the terminal.
Even the folder is created by the AVD Manager, you will not be able to see it unless you do it manually in the terminal.
Usually what the AVD Manager does is that it creates a .android folder in the root and it doesn't care if you were able to see it. What is important to him is that he created it.
First you must create a device to the emulator then click 'Details' to make sure where it is located. Then open the .android folder in the Terminal (using the location you saw in the Details but usually it is in the /var/root/ directory). Open Terminal, type open /var/root/.android
Second copy that directory to the tmp folder. type cp -R var/root/.android /tmp
Restart Eclipse and Run the Device using the AVD Manager.
Now, the Device will be open.
NOTE: Since this is a temporary folder, you have to copy the contents of the .android folder in the tmp folder every time you open your MAC.
Upvotes: 1
Reputation: 1
Seems this is related run the eclipse using root instead of normal user. You can also use symbol link:
ln -s /var/root/.android /tmp
Upvotes: 0
Reputation: 7635
This is just a patch but solved my problem. As eclipse is looking for avd inside tmp directory. so i have created .android/avd directory in tmp folder.
NOTE: you can't create any directory whose name starts with'.'. so you should create it from terminal.
and then copy original contents from /var/root/.android/avd
to /tmp/.android/avd/
N_JOY.
Upvotes: 1
Reputation: 4947
In Windows you should add the environment variable, there's probably such a thing in Mac OS but i'm not really familiar with that..
check this: (number 5 is your goal)
http://fyi.oreilly.com/2009/02/setting-up-your-android-develo.html
Upvotes: 1