java.lang.Object cannot be resolved in Eclipse

后端 未结 18 2150
青春惊慌失措
青春惊慌失措 2020-12-13 09:12

When I installed the latest installment in Mac OSX - the Mountain Lion - I experienced some problems getting Eclipse to work I also lost most of my Android developer files

相关标签:
18条回答
  • 2020-12-13 09:33

    Make sure that you have a valid JRE or JDK defined in the Java Build Path of your project. Right-click on your project, select Properties... and then Java Build Path.

    0 讨论(0)
  • 2020-12-13 09:34

    Try the following and problem will go away

    • Close the project and reopen it.
    • Clean the project (It will rebuild the buildpath hence reconfiguring with the JDK libraries)

      OR

    • Delete and Re-import the project and if necessary do the above steps again.

    0 讨论(0)
  • 2020-12-13 09:34

    This is an annoying Eclipse Bug which seems to bite now and then. See http://dev-answers.blogspot.de/2009/06/eclipse-build-errors-javalangobject.html for a possible solution, otherwise try the following;

    Close the project and reopen it. Clean the project (It will rebuild the buildpath hence reconfiguring with the JDK libraries)

    OR

    Delete and Re-import the project and if necessary do the above steps again.

    The better cure is to try NetBeans instead of Eclipse

    0 讨论(0)
  • 2020-12-13 09:34

    I had to add the JDK under the build path. After adding the correct build path it worked.

    0 讨论(0)
  • 2020-12-13 09:34

    This error caused by invalid sdk is pointing in your project.properties file of your project. project.properties -> target=android-19 . change to version which is installed in your eclipse.The error will be gone.

    0 讨论(0)
  • 2020-12-13 09:35

    I had the same issue and none of the above solutions worked for me. Then I realized than the library (libs) folder was missing in the project. Once i added the libs folder and the corresponding Jar file, the issue was resolved..

    0 讨论(0)
提交回复
热议问题