Eclipse:“导入java.io无法解析” [英] Eclipse: "The import java.io cannot be resolved"

查看:823
本文介绍了Eclipse:“导入java.io无法解析”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Eclipse中有几个Android项目,一切都很好,除了一个无法解析任何导入的库(图书馆)。



java.io导入在同一个工作空间中的其他Android项目中解决罚款,以前(我一直没有使用过一年),这个库也很好。



任何想法?

解决方案

检查您的Eclipse首选项:Java - >安装的JRE。您使用的应该被标记,它应该是一个JDK,而不仅仅是一个JRE。还要检查项目的构建路径:右键单击项目 - >属性 - > Java构建路径检查库文件夹中是否存在JRE系统库,如果不使用添加库 - >JRE系统库然后选择正确的(从已安装的JDK)。


I have several Android projects in Eclipse, and all is fine, except one (a library) that can not resolve any imports.

The java.io imports do resolve fine in other Android projects in the same workspace, and previously (I haven't used it for over a year) this library worked fine, too.

Any ideas?

解决方案

Check your Eclipse preferences: Java -> Installed JREs. The one that you're using should be marked and it should be a JDK not just a JRE. Also check your project's build path: Right click on the project -> Properties -> Java Build Path Check in the "libraries" folder whether the JRE System Library is present and if not add it using "Add library"->"JRE System Library" and then select the correct one (from an installed JDK).

这篇关于Eclipse:“导入java.io无法解析”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆