首页 > 解决方案 > IDE 致命错误

问题描述

我是 Android 开发的新手,我正在做这个练习,您创建一个基本 Activity(Android 4.4 kitkat)并删除 TextView 并在 CoordinatorLayout 中添加一个 ListView 并以每次单击它的方式对 Floating 操作按钮进行编程,它在列表中添加当前时间日期/月份/年份。IDE 没有显示任何语法错误,而且一切似乎都很好我正在运行最新版本的 Android Studio (3.3.1) 但是当我在我的 onePlus (Android 8) 上运行它时,应用程序根本没有打开(ABC 已停止 -再次打开应用程序),我尝试过清理/重建。

但是,当我点击我的 IDE 右下角的按钮时,它说发生了内部 IDE 错误,点击它后,它显示了一些对我来说相当压倒性的东西:

C:/Users/admin/AppData/Local/Android/Sdk/platforms/android-28/data/annotations.zip!/android/telephony/euicc/annotations.xml

org.xml.sax.SAXParseException; lineNumber: 22; columnNumber: 12; Content is not allowed in trailing section.
    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$TrailingMiscDispatcher.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)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
    at com.intellij.codeInsight.BaseExternalAnnotationsManager.getDataFromFile(BaseExternalAnnotationsManager.java:158)
    at com.intellij.codeInsight.BaseExternalAnnotationsManager.doCollect(BaseExternalAnnotationsManager.java:193)
    at com.intellij.codeInsight.BaseExternalAnnotationsManager.collectExternalAnnotations(BaseExternalAnnotationsManager.java:126)
    at com.intellij.codeInsight.BaseExternalAnnotationsManager.findExternalAnnotation(BaseExternalAnnotationsManager.java:88)
    at com.intellij.codeInsight.AnnotationUtil.lambda$null$0(AnnotationUtil.java:103)
    at com.intellij.util.containers.ConcurrentFactoryMap$3.create(ConcurrentFactoryMap.java:212)
    at com.intellij.util.containers.ConcurrentFactoryMap.get(ConcurrentFactoryMap.java:59)
    at com.intellij.codeInsight.AnnotationUtil.findNonCodeAnnotation(AnnotationUtil.java:121)
    at com.intellij.codeInsight.AnnotationUtil.findAnnotation(AnnotationUtil.java:76)
    at com.intellij.codeInsight.AnnotationUtil.findAnnotation(AnnotationUtil.java:55)
    at com.intellij.codeInsight.AnnotationUtil.findAnnotation(AnnotationUtil.java:48)
    at com.intellij.psi.impl.PsiImplUtil.isDeprecatedByAnnotation(PsiImplUtil.java:457)
    at com.intellij.psi.impl.compiled.ClsClassImpl.isDeprecated(ClsClassImpl.java:315)
    at com.intellij.codeInsight.lookup.impl.JavaElementLookupRenderer.isDeprecated(JavaElementLookupRenderer.java:72)
    at com.intellij.codeInsight.lookup.impl.JavaElementLookupRenderer.isToStrikeout(JavaElementLookupRenderer.java:68)
    at com.intellij.codeInsight.completion.JavaPsiClassReferenceElement.renderClassItem(JavaPsiClassReferenceElement.java:144)
    at com.intellij.codeInsight.lookup.PsiTypeLookupItem.renderElement(PsiTypeLookupItem.java:256)
    at com.intellij.codeInsight.lookup.LookupElementDecorator.renderElement(LookupElementDecorator.java:83)
    at com.intellij.codeInsight.lookup.LookupElementDecorator.renderElement(LookupElementDecorator.java:83)
    at com.intellij.codeInsight.lookup.impl.LookupImpl.renderItemApproximately(LookupImpl.java:458)
    at com.intellij.codeInsight.lookup.impl.LookupImpl.addItem(LookupImpl.java:247)
    at com.intellij.codeInsight.completion.CompletionProgressIndicator.addItemToLookup(CompletionProgressIndicator.java:438)
    at com.intellij.codeInsight.completion.CompletionProgressIndicator.addItem(CompletionProgressIndicator.java:429)
    at com.intellij.codeInsight.completion.AsyncCompletion$1.lambda$null$0(CompletionThreading.java:157)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1164)
    at com.intellij.codeInsight.completion.AsyncCompletion.tryReadOrCancel(CompletionThreading.java:181)
    at com.intellij.codeInsight.completion.AsyncCompletion$1.lambda$consume$1(CompletionThreading.java:157)
    at com.intellij.codeInsight.completion.AsyncCompletion$1WeighItems.run(CompletionThreading.java:125)
    at com.intellij.codeInsight.completion.AsyncCompletion.lambda$null$0(CompletionThreading.java:108)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
    at com.intellij.codeInsight.completion.AsyncCompletion.lambda$startThread$1(CompletionThreading.java:104)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

标签: android-studio

解决方案


推荐阅读