I am working with Eclipse Indigo on a MacBook Pro running Mac OS 10.5.8. I am trying to run the latest version of the Google Android plugin (version 18) but am receiving the following error when I try to create a new Android project:
The selected wizard could not be started.
Plug-in com.android.ide.eclipse.adt was unable to load classcom.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectWizard.
Bad version number in .class file
From what I can tell, the issue is that Eclipse is running under a VM with Java version 1.5. No matter what I do the Eclipse installation details configuration page is reporting:
-vm
/System/Library/Frameworks/JavaVM.framework
java.class.version=49.0
java.endorsed.dirs=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/endorsed
java.ext.dirs=/Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext
java.home=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
java.io.tmpdir=/var/folders/N-/N-YaOpnxGXqmE8+CqS2VxE+++TI/-Tmp-/
java.library.path=.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition
java.runtime.version=1.5.0_30-b03-389-9M3425
java.specification.name=Java Platform API Specification
java.specification.vendor=Sun Microsystems Inc.
java.specification.version=1.5
I have tried setting -vm in the eclipse.ini file and also in Info.plist I added: -vm/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Commands/java
What am I doing wrong? I’m very frustrated here.
Make sure you run the 64-bit Cocoa version of Eclipse 3.5.1, and make sure your JAVA_HOME is set to 1.6.0 and not 1.5.0. Also, set your Preferences->Java->Compiler to 1.6 inside Eclipse.