问题描述
我已将我的 SDK
和 ADT
更新到最新版本,我也更新了 Eclipse
到开普勒
最后一个 Juno
。
I have updated my SDK
and ADT
to the latest version, I have also update the Eclipse
to Kepler
the latest one after Juno
.
我的 ADT
版本是 22.0
。在我创建一个新项目的这个更新之后,我收到错误,指出 R无法解析为变量
。我已导入 import android.R;
,但它显示为未使用的导入说明不要在此包含android.R;为每个使用而使用完全限定名称
。
My ADT
version is 22.0
. After this update when I create a new project, I'm getting error, stating R cannot be resolved to a variable
. I have imported import android.R;
, but it is showing as unused import stating Don't include android.R here; use a fully qualified name for each usage instead
.
同样的事情发生在Mac OS也有最新的更新。我尝试将 activity_main.xml
重命名为其他名称,但仍然不生成我的 R.java
。
Same thing is happening with Mac OS also with the latest update. I have tried renaming activity_main.xml
to other name, but still my R.java
is not generated.
尝试所有可能的东西。清理项目,构建整个工作区。没有任何帮助。
Tried all the things which are possible. Cleaned the project, build the whole workspace. Nothing helping.
我认为 ADT
或 Eclipse
兼容性在更新后有问题。
I think ADT
or Eclipse
compatibility is having problem after the update.
我已经更新了我的整个SDK,这里是截图,但同样的问题是。
I have updated my whole SDK, here is the screenshot, but same problem is there.
推荐答案
更新到SDK Tools to rev。 22第一次,您可能需要重新启动Android SDK Manager并安装新的项目: Android SDK构建工具。
After updating to SDK Tools to rev. 22 for the first time, you may need to relaunch Android SDK Manager again and install a new item: Android SDK Build-tools.
之后安装它,清理您的项目并重建。
After installing this, clean your projects and rebuild.
这篇关于Eclipse发生错误,最近更新后缺少R.java文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!