手动modiffying r.java [英] manually modiffying r.java

查看:123
本文介绍了手动modiffying r.java的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作在Android的SDK(Eclipse中)平台2.2和我已经通过一些教程运行,有的人说,只是将文件添加到现有的文件夹,或添加文件夹;与它们内部的文件。在几个点当我创建一个新的文件夹,然后将新的文件里面,和code一切corectly R.java无法识别新的文件夹,甚至是新的文件(常量,按钮,串,参考IDS)。好几次,现在我不得不用手去中和manuallly改变R.java(添加类和常量)。

I am working in android SDK(Eclipse) platform 2.2 and I have been running through some tutorials, and some of them say to just add files to existing folder, or add folders; with files inside them. At several points when I create a new folder and place a new file inside it, and code everything corectly R.java does not recognize the new folder, or even the new file(constants, buttons, strings, reference ids). several times now I have had to go in and manuallly alter R.java (adding classes, and constants) by hand.

所以我的问题是多facited: 并R.java指望我来创建新的文件夹和文件,并依次生活给定的文件夹和文件(做多活动的应用程序几乎是不可能的)里面?

So my question is multi-facited: does R.java not expect me to create new folders, and files, and in turn live inside the given folders and files (making multi activity application near-impossible)?

如果我需要改变R.java手有什么具体的考虑命名和编号(内存地址),我应该遵循?

If I have to alter R.java by hand is there any specific consideration to naming and numbering(memory address) that I should follow?

有什么办法,我让R.java以recongnize一个文件夹/文件/班/常量,即使存在,而无需强力进入呢?

Is there any way for me to get R.java to recongnize that a folder/file/class/constant even exists without having to brute force enter it?

推荐答案

让我使用的是Eclipse猜测。

Let me Guess you are using eclipse.

这是所有的方式更好地启用该选项的项目 - 自动构建>自动构建。

It is all ways better to enable the option Build Automatically in Project->Build Automatically.

当你面对这个问题(R文件不会自动生成),按下列步骤。

When you face this problem( R file not generated automatically) follow the following steps.

1.右键单击该项目,然后单击关闭不相关的项目

1.Right Click on the project and click "Close Unrelated Project"

2.Refresh你目前的工作计划,并确保你看到你的所有新的内容出现在res文件夹中。

2.Refresh you current working projects and make sure you see all your new contents are there in the res folder.

3.Now取消选中自动构建,并单击生成所有的项目菜单。

3.Now Uncheck Build Automatically and Click Build All from the project menu.

4.Now清理项目。

4.Now clean the project.

希望现在你的问题就解决了​​。

Hope your problem is solved now.

这篇关于手动modiffying r.java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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