9 patch image prevent build project android studio

后端 未结 3 1536
醉梦人生
醉梦人生 2021-01-04 21:24

I am moving to Gradle build . but i have this error for a lot of 9-patch images .

Note the drawable is auto generated by http://android-holo-colors.com

3条回答
  •  暖寄归人
    2021-01-04 22:05

    Have you tried following the suggestions in the error log? I.e. take a look at the 3rd (possibly 4th if it treats it as zero indexed?) Pixel along the top row in an image editor:

    • Is the pixel red or black (#FF0000 or #000000)?
    • Does it have an alpha value of 255 or 0?

    If the answer is "no", then I guess that's your problem. This will then obviously also need to be applied to all other marker pixels around the edge of the images.

    I'd add this as a comment, but don't have enough rep - sorry.

提交回复
热议问题