Mateen Chaudhry
Mateen Chaudhry

Reputation: 661

Android : 9-Patch image Error

i imported this keyboard app from git everything is working fine but i am getting this error while building project

Error:top-left corner pixel must be either opaque white or transparent.
Error:found an invalid color.
Error:top-left corner pixel must be either opaque white or transparent.
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task ':app:mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for detail

can anyone tell me what is the problem please

Upvotes: 0

Views: 4756

Answers (1)

Izabela Orlowska
Izabela Orlowska

Reputation: 7532

This error is caused by an incorrect/corrupted 9-patch file. They should have a transparent or opaque white border, but yours doesn't seem to have it. Try following the steps in this: https://developer.android.com/studio/write/draw9patch.html

Upvotes: 2

Related Questions