我刚刚将一个项目从 eclipse 导入到 Android studio。几乎每第二张图片,android studio 都会出现以下错误。
Error:Must have one-pixel frame that is either transparent or white.
过去几个小时我一直在尝试编辑我的图像,但无法做到。谁能指导我什么是最好的解决方案。
为什么它只在 Android Studio 中,为什么不在 Eclipse 中。
最佳答案
显示此信息是因为您正在尝试编辑没有适当 1 像素边框的 9-Patch 图像。
Android 使用一种称为 9-Patch 的图像格式,它允许您定义图像中的可拉伸(stretch)区域(您可以阅读更多相关信息 here)。要解决您的问题,请向您的 png 图像添加一个 1 像素厚的外部透明框架,或者简单地将它们从 .9.png 文件重命名为 .png 文件
关于android - 错误 :Must have one-pixel frame that is either transparent or white in Android Studio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25602149/