Magic behind R.java file(R.java 文件背后的魔法)
问题描述
最近我在使用 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 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.
所以,我有两个问题:
- 我应该怎么做才能强制 Eclipse 重新生成文件
- 这里发生了什么?文件是如何创建的,生成文件的代码在哪里?
如果有任何帮助,我将不胜感激.像往常一样,问题发生在截止日期前几天:)
I would appreciate any help. As usual the problem occurred just a few days before the deadline :)
推荐答案
我发现了问题 - 我创建了一个 9patch 图像,其中补丁区域仅在 Y 轴上定义(我试图防止在另一个上调整大小).
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 文件背后的魔法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:R.java 文件背后的魔法
基础教程推荐
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
- RabbitMQ:消息保持“未确认"; 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- 如何对 Java Hashmap 中的值求和 2022-01-01
- Struts2 URL 无法访问 2022-01-01
- 存储 20 位数字的数据类型 2022-01-01
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
