简体   繁体   中英

Updating Java and JRE are causing many errors in Eclipse

I'm using Eclipse to program Android applications, and when I opened the program yesterday, it popped up an error saying I need to install JRE - I've downloaded the JRE and installed it - when during the installation I got a message saying that the JAVA version I have on the computer (Version 7) is too old for the JRE (Version 8), and that I need to update the JAVA also. I did so, and then opened up the Eclipse again - And all of the projects,that before worked great, are now full with errors. I tried installing all of the SDK updates - didn't work, also tried uninstalling Eclipse and re-install it - also didn't work.

The errors I get are: "XXX cannot be resolved to a type" - in amost every single line in the project.

How do I fix it?? Thank you!!

安装android开发工具(adt)..并全部更新SDK,然后导入旧程序。

I would suggest to check that your java build path is functioning properly. This kind of error for me usually means that eclipse cannot find the JRE installation.

Form eclipse you can go to Project->Properties and check for any errors there. Any inconsistency there would cause all your projects to fail.

First of all, you need the JDK installation, not JRE. Second, Android currently supports up to Java v7, which means you'll need to get JDK v7 from here . Make sure you download the correct 32-bit or 64-bit JDK version for your operating system.

Also, ensure your Android SDK and Android Development Tools (ADT) are on the same released version. Different versions of Android SDK and ADT can lead to many unforseen problems.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM