Android Studio Build Errors after 9 Patch pngs Added to res/drawable

1.2k views Asked by At

After using Android Studio's 9-patch generation tool to make a few 9 patch pngs, I get the following build errors when I try to run: Error:java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:

I've tried running clean, build, and Invalidate Caches / Restart and I cant get this error to resolve! When I delete the 9 patch image from my drawable/no-dpi folder and re-add the original non-9-patch png the code compiles and runs fine. How do I fix this error?enter image description here

Edit Using a different 9 patch image worked, so the problem seems to be with my 9 patch image I created. What's wrong with it? I want the text "Capo" to not stretch when the button is laid out vertically so I tried to make stretchy areas between that part of the image and the corners (which also shouldn't stretch).

2

There are 2 answers

6
Shashank Verma On BEST ANSWER

May be you were not creating perfect nine patch try this tutorialTry this link for creating perfect nine patch

and for testing try any nine patch downloaded from Internet.

0
Mrinmoy On

For Android Studio just open this image and save (Android Studio automatically use draw9patch tool).