0

I'm just learning android studio and getting this error and am unable to resolve. I can't even get what the problem is related with. (all other applications are working properly).I tried some other solutions from stackoverflow but none resolves my issue....

Any explanations???

AGPBI: {"kind":"error","text":"error: not well-formed (invalid token).","sources":[{"file":"C:\Users\*************\AndroidStudioProjects\myapp\app\src\main\res\layout\activity_main.xml","position":{"startLine":25}}],"original":"","tool":"AAPT"}

error: not well-formed (invalid token). Message{kind=ERROR, text=error: not well-formed (invalid token)., sources=[C:\Users*************\AndroidStudioProjects\myapp\app\src\main\res\layout\activity_main.xml:26], original message=, tool name=Optional.of(AAPT)}

Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details

zext
  • 3
  • 1
  • Aapt errors can come from a number of reasons.. Looks like this time it is in activity_main.xml ... Could you paste both activity main xml and java class – Ümañg ßürmån Sep 03 '18 at 03:30

1 Answers1

0

The error is telling you that your file activity_main.xml is not well-formed - that means it's probably missing a closing tag or similar, making it an invalid XML file.

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