被擦除R.java生成Android的支持-V4错误 [英] android-support-v4 error generated with R.java being erased

查看:146
本文介绍了被擦除R.java生成Android的支持-V4错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

确定,步骤IM以下。

1,从现有的源新项目

1-create new project from existing source

2,选择Android的\ Android的SDK \演员\机器人\兼容性\ V4 \样本\ Support4Demos

2-select Android\android-sdk\extras\android\compatibility\v4\samples\Support4Demos

3,完成

所以,我美丽的月食将创建项目,但他抹去根的R.java类,所以我从每类的包出现错误。我的事情

So, my beautiful eclipse creates the project but he erase the R.java class from gen so i get errors from every class of the package. I thing

此外,style.xml给我一些错误。

Also, style.xml give me some error.

这是我的命,因为我可以学到什么从这3天,我我的朋友谷歌是没有帮助与此有关。

This is killing me because i can learn nothing from this for 3 days and i my friend google is not helping with this.

THX提前!

推荐答案

我试着在Eclipse中同样的事情,我看到几乎每个文件,有一个失败的导入:

I tried the same thing in Eclipse, and I saw on Most every file, there was a failed import:

import android.support.v4.app.DialogFragment;
import android.support.v4.app.FragmentActivity;

所以,我做了什么来解决这个问题,就是:

So, what I did to fix it, was:

  1. 右键点击您的项目(Support4Demos)在左侧的导航菜单。
  2. 单击属性。
  3. 单击Java构建路径左侧导航窗格中。
  4. 单击添加外部JAR右边按钮。
  5. 导航到:\ Android的SDK \演员\机器人\兼容性\ V4
  6. 选择Android的支持 - v4.jar,然后单击打开,然后单击确定。
  7. 左键点击你的项目(Support4Demos)。
  8. 点击项目的顶部,然后单击清洁,然后单击确定。

可能并不需要的最后两个步骤。但是,当你做的这一切,它可能会解决它。您还需要修复XML文件中的任何错误。

The last two steps might not be needed. But when you do all this, it may fix it. You would also need to fix any error in the XML file.

编辑:
试试这个:


Try this:

  1. 右键点击您的项目,并选择属性。
  2. 选择Android的。
  3. 确保它在Android 3.2或更高的设置。

的Andr​​oid 3.2是在引入的Holo主题的时候。

这篇关于被擦除R.java生成Android的支持-V4错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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