问题
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