0

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

Mateen Chaudhry
  • 631
  • 12
  • 32
  • Possible duplicate of [Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details](https://stackoverflow.com/questions/46988102/errorcom-android-tools-aapt2-aapt2exception-aapt2-error-check-logs-for-detail) – AskNilesh Mar 19 '18 at 09:42
  • some time this is caused by long directory path. – Nouman Ch Mar 19 '18 at 09:42
  • @NoumanCh directory path mean? can you please tell me how to trace which image is causing this problem – Mateen Chaudhry Mar 20 '18 at 05:35

1 Answers1

2

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

Izabela Orlowska
  • 7,431
  • 2
  • 20
  • 33