I am not able to build. I know the error is in jdkAnnotations.jar. I reinstalled android studio, but the problem persists. It also says no IDEA annotations attached in jdk 1.8. Should i reinstall jdk 1.8 also? i am clicking on the button that says attach annotations but nothing is happening. Please help. And why is this problem happening? is there something wrong in any xml resource file or what?
C:/Program Files/Android/Android Studio/lib/jdkAnnotations.jar!/java/awt/event/annotations.xml: Content is not allowed in prolog.
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
I got the same error today. Just reinstalling Android Studio did not help. The following steps worked for me:
Now all the Settings will be reinstalled and you can work on with your project
Had the same problem, it seems like others stated, a BOM problem, some HEX bytes at the begin of the file to mark its file format. To solve it:
Then in your Android project project try to click in the Attach annotations option, and that should solve the problem.
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With