Error:layout bounds on right border must start at edge

给你一囗甜甜゛ 提交于 2019-12-01 21:06:12

问题


My project works fine yesterday; but when I Updated Android studio to 3.0 today and accordingly AAPT2 is enables by default. I have the following error:

Error:layout bounds on right border must start at edge.
Error:Execution failed for task ':app:mergeDevDebugResources'.
Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

I opened log file but can not find a clue. when I google Error:layout bounds on right border must start at edge questions about 9-patches in come in results. I have about 10 9-patches in my project too. but I am not sure what is the problem. I know I can disable Aapt2 but I want to resolve problem. Thanks.


回答1:


You can check which one of them is bad by running "gradlew --info assembleDebug" in the terminal. In my case I removed the red border from one of them. Hope it helps.




回答2:


I faced the same problem after updating to 3.0. Added this line in the "gradle.properties" file of my project.

android.enableAapt2=false

Let me know if this works.



来源:https://stackoverflow.com/questions/46947961/errorlayout-bounds-on-right-border-must-start-at-edge

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