9-patch image error in Android

前端 未结 14 1056
野性不改
野性不改 2020-12-04 12:53

Whenever I try to add a 9-patch image to the \\drawable folder in my project, I get the same error:

ERROR: 9-patch image C:\\...\\res\\drawable\         


        
14条回答
  •  粉色の甜心
    2020-12-04 13:39

    When we nine patch any image it creates a black line to its border. That border should be transparent or completely solid. If it is not, this error will come.

    So the solution is to increase the width and height by two pixels. (In Photoshop increase the size of the canvas, not the image.)

提交回复
热议问题