在我的R.java文件错误不能得到解决 [英] Error in my R.java file cannot be resolved

查看:144
本文介绍了在我的R.java文件错误不能得到解决的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Eclipse ADT包和最近更新我的Andr​​oid SDK工具和SDK的Andr​​oid平台工具那么以后我试图创建一个新的项目,我不断收到一个错误,这似乎微不足道,但我还是不明白我的R.java文件如何不断显示出来,因为它是一个自动生成的文件
的错误是:
语法错误,将}来完成ClassBody

请记住这一点。就是当我刚刚创建的项目。同时删除该文件,并让它自动生成仍得到相同的结果,那就是错误。
我如何才能解决这个请大家帮帮忙,似乎无法找到一个新的ADT捆绑任何链接。
此错误显示在控制台:

错误:MenuView,无法找到属性的android:preserveIconSpacing

解决方案
  1. 导航到\ Android.Support.v7.AppCompat \ 2x.xx \内容\ SUPPORT \ V7 \ appcompat \水库\值\ attrs.xml侧项目目录。

    在您的工作空间打开AppCompat项目并导航到\水库\值\ attrs.xml

  2. 查找:在attrs.xml文件的Andr​​oid preserveIconSpacing,并和注释该行

  3. 再重新生成项目。

希望这解决了问题。

I am using the Eclipse ADT bundle and recently updated my Android SDK tools and Android SDK platform tools then thereafter I tried creating a new project and I keep getting an error in my R.java file that seems trivial but I still dont understand how it keeps showing up since it is an autogenerated file.
The error is:
Syntax error, insert "}" to complete ClassBody.

Keep in mind this is when I have just created the project. Also deleting the file and letting it autogenerate still yields the same result that is the error.
Please help on how I can solve this,can't seem to find any links to a newer ADT bundle.
This error shows up in the console:

ERROR: In MenuView, unable to find attribute android:preserveIconSpacing

解决方案

  1. Navigate to \Android.Support.v7.AppCompat\2x.x.x\content\support\v7\appcompat\res\values\attrs.xml in side your project directory.

    or

    open the AppCompat project in your workspace and navigate to \res\values\attrs.xml

  2. Find "android:preserveIconSpacing" in attrs.xml file and and comment that line.

  3. Rebuild the project again.

Hope this solves the issue.

这篇关于在我的R.java文件错误不能得到解决的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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