错误:必须有一个像素的帧是透明或白色机器人工作室 [英] Error:Must have one-pixel frame that is either transparent or white in Android Studio

查看:824
本文介绍了错误:必须有一个像素的帧是透明或白色机器人工作室的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚引进一个项目,从偏食到Android工作室。几乎每隔一图像,机器人工作室是给下面的错误。

I have just imported a project from eclipse to Android studio. Almost for every second image , android studio is giving the following error.

Error:Must have one-pixel frame that is either transparent or white.

我想编辑我的图像,最后几个小时,却无法做到这一点。任何人都可以引导我什么是它的最佳解决方案。

I am trying to edit my images for last few hours, but couldn't do it. Can anyone guide me whats the best solution for it.

为什么它仅在Android的工作室为什么不能在Eclipse中。

Why its in only Android Studio why not in Eclipse.

推荐答案

这是显示,因为你试图编辑不具有相应的1个像素的边框的9片图像。

This is shown because you're trying to edit 9-Patch images that don't have the appropriate 1-pixel border.

Android使用所谓的9补丁的图像格式,它可以让你在图像定义拉伸区域(你可以阅读更多关于它的这里)。为了解决您的问题,无论是加外1像素厚的透明框架到你的PNG图像或简单地从 .9.png 的文件重命名他们的巴纽文件

Android uses an image format called 9-Patch which allows you to define stretchable areas in an image (you can read more about it here). To fix your problem, either add an outer 1-pixel thick transparent frame to your png images or simply rename them from .9.png files to .png files

这篇关于错误:必须有一个像素的帧是透明或白色机器人工作室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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