Eclipse error: NoClassDefFoundError: java/lang/ref/FinalReference

前端 未结 5 1654
庸人自扰
庸人自扰 2020-12-10 05:08

I\'ve installed Eclipse for android and that works okay. When I try to start a java-file I got the following error: Error occurred during initialization of VM java/lang/NoCl

5条回答
  •  一生所求
    2020-12-10 05:51

    I was trying to use all the answers above but it doesn´t work.

    This error happened when I wrote 1 method that returned a String [][] ( don't know why yet) but the error doesn't disappear when I disable (/* */) the method.

    Finally I did 2 things:

    1. Created a new Android Project and copy the files. rebuild the Activity.java and the manifest.xml.

      It worked until I activate the method then the same error all over again:

      VM java/lang/NoClassDefFoundError: java/lang/ref/FinalReference and then

      Error occurred during initialization of VM and no matter what I do, it didn´t work until I create another Android Project.

    2. So the 2nd thing I did was :

      Run-> Run Configurations->Java Application and click on New_Configuration then I clicked on the red X above (Delete selected launch configuration) and it worked ( not the method but the program worked when I /* */ it.)

提交回复
热议问题