" R解决不了"可能有错误的构建路径或库导入 [英] "R cannot be resolved" may have wrong build path or libraries import

查看:196
本文介绍了" R解决不了"可能有错误的构建路径或库导入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个问题已经很多次,但相信我,我都检查过了。大部分的问题都表明,除去导入android.R,在XML文件中删除任何错误,检查文件(没有大写字母)的名称,然后重建和清理项目或重新启动Eclipse 。我已经尝试了所有,但没有解决问题。 问题发生时,我打扫的所有项目。现在所有的项目都出现了这个错误。由于所有的项目都运行完美之前,我清理项目,也不可能所有的突然布局或所有项目的文件名,在其中有错误。

I know this question has been many times but trust me I have checked all. Most of the question suggests to remove import android.R , remove any error in the xml file, checking name of the files (no capital letters) then rebuild and clean the project or restart eclipse. I have tried all but none solved the problem. The problem occured when i cleaned all the projects. Now all the projects are showing that error. Since all the project were running perfectly before i cleaned projects, there is no possibility that all of the sudden the layouts or the file names of all the projects have error in them.

也有是在没有文件根文件夹。至于我能理解有一些错误的构建路径 preferences 可以anyne点我一个正确的方向吗?

Also there is no file in gen folder. As far as i can understand there is something wrong with the build path or preferences can anyne point me in a correct direction? !

推荐答案

请确保你安装了 Android编译工具形式SDK管理器

Make sure you installed the Android build tool form sdk manager

项目右键属性 - > Java的构建路径选择库,并添加 Android的support.jar 的请按照下列步骤。

project right click properties-> Java BuildPath select Library and add android-support.jar the follow these step.

转到项目 - >属性 - >比选择订单和出口标签的Java构建路径。设置 Android的支持的.jar 库检查,向上成名列榜首。而清洁rebuild..It适用于大多数的情况下,

Go to Project->Properties->Java Build Path than select Order and export tab. Set android-support .jar library checked and up it into top of the list. And clean and rebuild..It works for most of the cases

这篇关于" R解决不了"可能有错误的构建路径或库导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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