Removal of two common errors that may arise when running the android project on eclipse.
[ PANIC: Could not open: C:\Users\gTiwari\.android/avd/MyAndAVD.ini ]
and
[ invalid command-line parameter: Files ]
Today I tried to setup the essentials and test a demo project on Eclipse.I installed required tools (Android SDK, ADT, etc) and created a empty project successfully.
I was following these articles :
Installing Android SDK and ADT in eclipse.
Android First HelloWorld App in Eclipse.
But I got the few errors when I tried run the Hello World project that eclipse created for me.
In this Blog, I am describing the errors and how I solved them that may be useful for Android beginners like you.
[My System Details : Windows 7(64-bit). Eclipse 3.7 (Indigo).The MyFirstEmul is the name of emulator I created.]
Error #1
When i created a hello world project and tried to run it. I got the following error.
[2011-08-27 18:05:22 - Emulator] PANIC: Could not open: C:\Users\gTiwari\.android/avd/MyAndAVD.ini
Cause :
The emulator could not found in location "C:\Users\gTiwari\". I searched over my HDD for the emulator I created earlier. And I found it in the E:\ .android folder. This might be due to I had moved my system folders such as Documents, Desktop, Downloads to E:\.
Solution :
I simply moved the E:\.android folder to C:\Users\gTiwari\ and solved it.
Error #2
After I solved the Error #1, and tried to run the project, I got the following error :
[2011-08-27 18:24:39 - Emulator] invalid command-line parameter: Files.
[2011-08-27 18:24:39 - Emulator] Hint: use '@foo' to launch a virtual device named 'foo'.
[2011-08-27 18:24:39 - Emulator] please use -help for more information
Cause :
The default installation location is: C:\Programme Files(x86)\Android\android-sdk. But the SDK location cannot contain any spaces.
Solution :
Should I reinstall the Android SDK to new location with no space in folder names ?
Well, that may be a solution. But i found
easy solution for this.
I make use of
mklink command line utility of NTFS in Windows 7 (in previous versions of the command may be different). I pointed C:\AndroidSDK to the actual C:\Program Files (x86)\Android\android-sdk by using following command.
MKLINK /J C:\AndroidSDK "C:\Program Files (x86)\Android\android-sdk\"
This command created special junction folder C:\AndroidSDK helped me in redirection.
And I configured this new path(
C:\AndroidSDK) to AndroidSDK in Eclipse IDE settings - from
Windows -> Preferences -> Android
And run the Hello World project successfully.
See my other posts on android from :
http://ganeshtiwaridotcomdotnp.blogspot.com/search/label/Android