魔法背后的R.java文件 [英] Magic behind R.java file

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

问题描述

最近我在R.java文件中遇到了一些问题。现在我已经决定做一个备份并删除该文件,看看会发生什么。



没有任何事情发生,所以我创建了一个空的R.java文件,并期待着最好的。现在Eclipse似乎弄清楚文件被篡改,甚至发出警告:

  R.java手动修改!恢复生成版本! 

这就是全部。我尝试手动构建,但没有结果。



所以,我有两个问题:


  1. Eclipse重新生成文件

  2. 这里发生了什么?如何创建文件,生成文件的代码在哪里?

我很乐意提供任何帮助。像往常一样,问题只在截止日期前几天发生:)

解决方案

我发现问题 - 我创建了一个9贴图补丁区域仅在Y轴上定义(我试图阻止另一个调整大小)。



问题是:为什么没有警告错误?或者如果有 - 埋在哪里?


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.

Nothing happened, so I created an empty R.java file and hoped for the best. Now Eclipse seems to figure out that the file was tampered 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.

So, I have two questions:

  1. what should I do to force Eclipse to regenerate the file
  2. what is happening here? How is the file created, where is the code that is generating the file?

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

解决方案

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?

这篇关于魔法背后的R.java文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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