Error when trying to load Android 1.6 virtual device from eclipse

坚强是说给别人听的谎言 提交于 2019-12-11 02:08:59

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!