Android : 9-Patch image Error

家住魔仙堡 提交于 2019-12-24 22:16:05

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/49359795/android-9-patch-image-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!