机器人 - 如何重新生成R.java文件? [英] android - How to regenerate R.java file?

查看:224
本文介绍了机器人 - 如何重新生成R.java文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:结果
  <一href=\"http://stackoverflow.com/questions/2757107/developing-for-android-in-eclipse-r-java-not-generating\">Developing为Android在Eclipse:R.java不会产生

我在我的日食一个问题,我做了一个项目,我想放一些图片和视频。我拖动和绘制,华电国际放弃这一图像。但是,当我来到我main.java和写(R.drawable)比图像不dispayed。是我的日食currupt?哪一个是好日食版本Android开发?

I have a one problem in my eclipse, I have done one project I want to put some images and videos. I drag and drop this images in drawable-hdpi. But when i come to my main.java and Write (R.drawable.) than images are not dispayed. Is my eclipse currupt?? Which one is good eclipse version for android development??

推荐答案

我假设你没有在Eclipse中选择了自动构建选项。
在这种情况下,新的可绘的id不会得到自动生成。 (除非你生成项目)
所以,只要刷新绘制,华电国际文件夹从Eclipse(通过右键单击它),然后再清理 - >构建。
该ID就会产生。

I'm assuming you have not selected 'Build Automatically' option in Eclipse. In that case, the ids of the new drawables wont get generated automatically. (unless you build the project) So, just refresh your drawable-hdpi folder from the eclipse (by right clicking it) and then Clean-->Build. The ids will get generated.

这篇关于机器人 - 如何重新生成R.java文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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