Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error:Must have one-pixel frame that is either transparent or white in Android Studio

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.

Why its in only Android Studio why not in Eclipse.

like image 592
BST Kaal Avatar asked Sep 01 '14 08:09

BST Kaal


1 Answers

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

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

like image 58
mittelmania Avatar answered Oct 12 '22 11:10

mittelmania