不会产生R.Java [英] R.Java not generated

查看:233
本文介绍了不会产生R.Java的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载了code我导入项目在我的Eclipse IDE 它不产生R.Java file.I搜查了许多博客和论坛,并尝试了很多东西清洗,改造,从现有的源等,但仍然面临着problem.Some人提到,它有时造成SVN客户端软件创建项目,但他们没有提到的,如果你下载它自己,找到了什么是确切的问题that.I任何解决方案将是非常感谢你们。

I have downloaded code from google codes but when I import that project in my eclipse IDE it does not generate R.Java file.I searched many blogs and forums and tried many things like cleaning ,rebuilding, creating project from existing source etc but still facing the problem.Some people mentioned that it is sometimes caused by the SVN client software,but none of them mentioned any solution for that.I will be very thankful to you guys if you download it yourself and find what is the exact problem.

推荐答案

在一般情况下,使其工作:

In general, to make it work:

  1. 导入项目到Eclipse(文件 - >导入 - >常规 - >现有项目到工作区)
  2. 在Eclipse中,手动创建根文件夹,并添加源文件夹(右键点击你的项目,构建路径 - >配置构建路径 - >添加文件夹)
  3. 清洁你的项目,你想获得R.java产生

但它没有,为什么?

由于有一些编译错误(或错误?)就在水库的XML文件,所以R的不genetared(我在我的Mac测试):
在水库/价值/ styles.xml:注释掉以下内容:

Because there are some compile error (or bug?) regarding to the xml file in res, so R is not genetared (I've tested on my Mac):
In res/values/styles.xml: commented out the following:

<style name="iWindowTitleBackground" parent="android:WindowTitleBackground">    
  <item name="android:background">@drawable/title_bar</item>        
</style>

在RES /价值/的themes.xml:注释掉以下内容:

In res/values/themes.xml: comment out the following:

<item name="android:windowTitleBackgroundStyle">@style/iWindowTitleBackground</item>

然后做一个项目 - >清洁,你应该得到R.java产生。

Then do a Project -> Clean, you should get R.java generated.

有错误报道,父=机器人:WindowTitleBackground不能在某些操作系统中解决了,检查出的这里了解更多详情。

There is bug reported that parent="android:WindowTitleBackground" cannot be resolved in some operating system, check out here for more details.

这篇关于不会产生R.Java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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