Then you’ll need:
- Install ADT Plugin in Eclipse.
- Use the ADT Plugin to add platforms and other components: Eclipse, Window, Android SDK:
- Setup a new emulator (AVD: Android Virtual Device).
- Use your Android device for debug.
Problems and Fixes
Lots of help on the Android pages here, but my own notes:
- Eclipse: No Java virtual machine was found
On loading eclipse you might experience the error:
”A… Java Development Kit (JDK)… must be available in order to run Eclipse. No Java virtual machine was found…”
- You might have the wrong versions of Eclipse and the SDK e.g. a 64bit eclipse and a 32bit Java or visa versa. If you’re not sure you can
- You might try specifying the –vm switch: Create a shortcut to eclipse then append the path to your JDK so you would end up with a target like:
"E:\Program Files\Eclipse\eclipse.exe" -vm "C:\Program Files\Java\jdk1.6.0_29"
- ADT Installation Error: "requires plug-in org.eclipse.wst.sse.ui"
- Android Emulator fails to run under Eclipse
When you try to run the emulator if it fails with:
error: unknown virtual device name: '[emulator name]'
Then it’s probably looking for the AVD files in the wrong place. in Windows the default is “C:\Users\[username]\.android” so you need to set an environment variable to wherever it is e.g. as of writing:
- Click start and type environment or Go to: Control Panel/System/Advanced System Settings/Advanced tab/Environment Variables button (at bottom)
- Click New and enter:
[path to folder] e.g. F:\Users\[username]\
- Restart Eclipse
to the application element.
Which should give output like:
List of devices attached