How to fix Starting emulator for AVD 'androidname' PANIC: Could not open: androidname on MAC OSX

On MAC OSX you may encounter this error when you programming in android using Android SDK on Eclipse Kepler. This happens when you logged in to your root account and by trying to run a specific android avd and nothing happens.

Starting emulator for AVD 'androidname'
PANIC: Could not open: androidname



 See image below;



You will end up closing your eclipse ide and lose yourself. To be able to fix this you just need to do the following:

  1. Open terminal and type "open /tmp" always without quotes like this

    To be able to open tmp folder
     

    NOTE: you can't create any directory whose name starts with'.'. so you should create it from terminal

  2. Now on terminal type "mkdir /tmp/.android" to create .android directory because android sdk searching the avd on tmp folder of your mac osx. Like this one: dont forget to press return/enter key on your keyboard

    Now on tmp folder using finder you will notice the .android folder will be created

  3. Now you'll need to copy the content of /var/root/.android to /tmp/.android. Open /var/root/.android by using the same method above by typing in terminal "open /var/root.android" it should look like this:

  4. Now open the the two folder simultaneously then copy all contents from /var/root/.android to /tmp/.android folder.

    Similar to command line in terminal just type "cp -Rv /var/root/.android/ /tmp/.android/" without quotes like this 

  5. Then it should look like this





  6. Restart Eclipse and Run the Device using the AVD Manager.
  7. Then viola! the Device can now 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 reboot your MAC.

Ready to code!!!



No comments:

Post a Comment