问题
I am self leaning Java rookie
and I doth (as in Shakespeare 'Doth')received the following error message back when trying to start the Android 1.6 VM( The reason I am using Android 1.6 and not later versions is that it takes less time to load on my slow P.C!) from Eclipse:
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/ref/FinalReference
I have successfully started Android 1.6 VM from the AVD manager so the VM software appears to be O.K.
and the source code appears to be o.k - and is the default code that should initialize the VM:
package com.leigh.namespace;
import android.app.Activity;
import android.os.Bundle;
public class HelloWorldActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
Any Help would would be appreciated.
回答1:
But for you information I have JDK1.7.0_03 compiler installed
The android tools, such as the emulator, depend on a JDK 6 (1.6.x) installation. They won't run properly with a JDK 7 installation (1.7.x). Install JDK 6 instead and try again.
来源:https://stackoverflow.com/questions/11050576/error-when-trying-to-load-android-1-6-virtual-device-from-eclipse