Android AAPT 问题 - 将新图像替换为资源时 [英] Android AAPT Issue- While replacing new image to the resource
问题描述
更新我的 eclipse 和 Android SDK 后,我在将文件粘贴到 drawable 时遇到了一些问题.实际上,我正在尝试替换同名的新图像.在我重新启动 eclipse 后,错误出现了.是什么原因,我该如何避免.请指导我.
After I updated my eclipse and Android SDK I encounter some problem while pasting a file to the drawable. Actually I am trying to replace a new image in the same name. After I restart the eclipse the error went of. What is the reason and how can I avoid it. Please guide me.
**Log:**
Error: name expected logo.png /Sample/res/drawable-large line 4 Android AAPT Problem
推荐答案
我看到了同样的事情.它似乎是最新版本中的一个错误,并且不仅限于图像文件.我在处理原始资源时遇到了类似的问题——AAPT 尝试将任何粘贴到 res
文件夹中的内容解析为 XML.
I'm seeing the same sort of thing. It appears to be a bug in the latest release, and it's not limited to image files. I'm having similar problems with raw resources--the AAPT tries to parse anything that's pasted into the res
folder as XML.
您还可以通过清理项目来清除错误,而不是重新启动 Eclipse.
Rather than restarting Eclipse, you can also clear the errors by cleaning the project.
EDIT 这显然在最近发布的工具中得到了修复.如果您仍然遇到问题,请确保您拥有所有内容的最新更新.
EDIT This was evidently fixed in more recent releases of the tools. If you are still experiencing the problem, make sure you have the latest updates of everything.
这篇关于Android AAPT 问题 - 将新图像替换为资源时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!