背后R.java文件魔术魔术、文件、java

2023-09-12 22:38:32 作者:有些人只能埋藏于心

最近我一直有相当一些问题R.java文件。现在,我已经决定做一个备份并删除文件,看看会发生什么。

Recently I have been having quite some problems with R.java file. Now I have decided to do a backup and delete the file to see what happens.

什么都没有发生,所以我创建了一个空R.java文件,并跳上最佳。现在的Eclipse似乎找出该文件已与磨砺,甚至发出警告:

Nothing happened, so I created an empty R.java file and hopped for the best. Now Eclipse seems to figure out that the file was tempered with and even issues a warning:

R.java was modified manually! Reverting to generated version!

这是所有有。我试图手动构建它,但没有得到结果。

And that's all there is. I tried building it manually but got no results.

所以,我有两个问题:

我应该怎么做才能强制Eclipse以生成文件 在这里发生了什么?如何在文件创建,哪里是code在生成文件?

我会AP preciate任何帮助。像往常一样,出现问题就在最后期限前几天:)

I would appreciate any help. As usual the problem occurred just a few days before the deadline :)

推荐答案

我发现了问题 - 我已创建了只在Y轴定义的补丁区域9patch图像(我试图prevent调整上其他的一个)。

I found the problem - I have created a 9patch image with the patch area defined only on the Y axis (I was trying to prevent resizing on the other one).

现在的问题是:为什么没有一个有关错误的警告?或者,如果有是 - ?它在哪儿埋

The question remains: Why isn't there a warning about the error? Or if there is - where is it buried?