9-patch image error in Android

前端 未结 14 1047
野性不改
野性不改 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:50

    In my case I mistakenly extended the black border into the top left corner. Make sure the corners are transparent.

    0 讨论(0)
  • 2020-12-04 13:50

    I found the issue is about *.9.png files. Open and check all your 9-Patch files, make sure that all files have black 1 pixel wide border, if don't have, just click the white place and add it, then save it.

    It's the only solution to my problem.

    0 讨论(0)
提交回复
热议问题