How can I solve this problem, when I am building it, it is showing me the same problem- java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Ex
I had the same issue. Apparently this line had to be at the top of the main XML file and was 2 or 3 lines below.
Cut and pasted to top of XML file and build succeeded.