我无法建立。我知道错误在jdkAnnotations.jar中。我重新安装了android studio,但问题仍然存在。它还说jdk 1.8中没有附加IDEA注释。我还应该重新安装jdk 1.8吗?我单击显示附加注释的按钮,但没有任何反应。请帮忙。为什么会发生此问题? xml资源文件中有什么问题吗?

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)

最佳答案

我今天遇到了同样的错误。只是重新安装Android Studio并没有帮助。以下步骤对我有用:

  • 关闭Android Studio
  • 转到C:\ Users \ Username
  • 删除整个文件夹:“。AndroidStudioX.X”和“.gradle”
  • 启动Android Studio

  • 现在,所有设置将被重新安装,您可以处理项目

    08-18 18:17
    查看更多