Android studio 3.x版 不顯示自己列印的log日誌問題解決
阿新 • • 發佈:2018-12-12
com.intellij.openapi.diagnostic.Logger$EmptyThrowable
。。。。
com.intellij.openapi.diagnostic.Logger.error(Logger.java:115)
。。。。
今天在開發的時候,打log測試,結果自己寫的log在控制檯沒有輸出,以為自己寫的有問題,查找了半天,仍沒發現原因。網上搜,也沒找到合適的解決方法。
一不小心,發現右下角有個紅色的感嘆號,點開發現如下的error,居然沒影響執行。
先將問題的詳細描述列出來,解決辦法:請拉到博文的最後^_^
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:115 )
at com.intellij.psi.stubs.StubIndexImpl.reportStubPsiMismatch(StubIndexImpl.java:534)
at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:155)
at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:134)
at com.intellij.psi.impl.java.stubs.index.JavaSuperClassNameOccurenceIndex.get(JavaSuperClassNameOccurenceIndex.java:49 )
at com.intellij.psi.impl.search.JavaDirectInheritorsSearcher$5.compute(JavaDirectInheritorsSearcher.java:107)
at com.intellij.psi.impl.search.JavaDirectInheritorsSearcher$5.compute(JavaDirectInheritorsSearcher.java:104)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:884 )
at com.intellij.psi.impl.search.JavaDirectInheritorsSearcher.execute(JavaDirectInheritorsSearcher.java:104)
at com.intellij.psi.impl.search.JavaDirectInheritorsSearcher.execute(JavaDirectInheritorsSearcher.java:49)
at com.intellij.util.ExecutorsQuery.processResults(ExecutorsQuery.java:43)
at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:75)
at com.intellij.util.UniqueResultsQuery.process(UniqueResultsQuery.java:66)
at com.intellij.util.UniqueResultsQuery.forEach(UniqueResultsQuery.java:56)
at com.intellij.psi.search.searches.ClassInheritorsSearch.processInheritors(ClassInheritorsSearch.java:287)
at com.intellij.psi.search.searches.ClassInheritorsSearch.access$100(ClassInheritorsSearch.java:46)
at com.intellij.psi.search.searches.ClassInheritorsSearch$1.execute(ClassInheritorsSearch.java:75)
at com.intellij.psi.search.searches.ClassInheritorsSearch$1.execute(ClassInheritorsSearch.java:53)
at com.intellij.util.ExecutorsQuery.processResults(ExecutorsQuery.java:43)
at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:75)
at com.intellij.util.UniqueResultsQuery.process(UniqueResultsQuery.java:66)
at com.intellij.util.UniqueResultsQuery.forEach(UniqueResultsQuery.java:56)
at org.jetbrains.android.facet.AndroidFacet.fillMap(AndroidFacet.java:1022)
at org.jetbrains.android.facet.AndroidFacet.computeClassMap(AndroidFacet.java:968)
at org.jetbrains.android.facet.AndroidFacet.access$500(AndroidFacet.java:116)
at org.jetbrains.android.facet.AndroidFacet$4.compute(AndroidFacet.java:924)
at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:49)
at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:200)
at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:38)
at org.jetbrains.android.facet.AndroidFacet.getClassMap(AndroidFacet.java:930)
at org.jetbrains.android.dom.AndroidDomExtender.getViewClassMap(AndroidDomExtender.java:425)
at org.jetbrains.android.dom.AndroidDomExtender.registerExtensionsForLayout(AndroidDomExtender.java:482)
at org.jetbrains.android.dom.AndroidDomExtender.processAttrsAndSubtags(AndroidDomExtender.java:624)
at org.jetbrains.android.dom.AndroidDomExtender.registerExtensions(AndroidDomExtender.java:830)
at org.jetbrains.android.dom.AndroidDomExtender.registerExtensions(AndroidDomExtender.java:78)
at com.intellij.util.xml.reflect.DomExtenderEP.extend(DomExtenderEP.java:62)
at com.intellij.util.xml.impl.DynamicGenericInfo.runDomExtenders(DynamicGenericInfo.java:164)
at com.intellij.util.xml.impl.DynamicGenericInfo.access$000(DynamicGenericInfo.java:49)
at com.intellij.util.xml.impl.DynamicGenericInfo$1.compute(DynamicGenericInfo.java:84)
at com.intellij.util.xml.impl.DynamicGenericInfo$1.compute(DynamicGenericInfo.java:81)
at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
at com.intellij.util.xml.impl.DynamicGenericInfo.checkInitialized(DynamicGenericInfo.java:81)
at com.intellij.util.xml.impl.DynamicGenericInfo.getCustomNameChildrenDescription(DynamicGenericInfo.java:195)
at com.intellij.util.xml.impl.DomSemContributor$5.fun(DomSemContributor.java:180)
at com.intellij.util.xml.impl.DomSemContributor$5.fun(DomSemContributor.java:161)
at com.intellij.semantic.SemServiceImpl$6$1.fun(SemServiceImpl.java:129)
at com.intellij.semantic.SemServiceImpl$6$1.fun(SemServiceImpl.java:125)
at com.intellij.semantic.SemServiceImpl.createSemElements(SemServiceImpl.java:216)
at com.intellij.semantic.SemServiceImpl.getSemElements(SemServiceImpl.java:186)
at com.intellij.semantic.SemService.getSemElement(SemService.java:37)
at com.intellij.util.xml.impl.DomManagerImpl.getDomHandler(DomManagerImpl.java:389)
at com.intellij.util.xml.impl.DomManagerImpl.getDomElement(DomManagerImpl.java:366)
at org.jetbrains.android.dom.AndroidDomElementDescriptorProvider.getDomElementAndBaseClassQName(AndroidDomElementDescriptorProvider.java:98)
at org.jetbrains.android.dom.AndroidXmlReferenceProvider.computeBaseClass(AndroidXmlReferenceProvider.java:113)
at org.jetbrains.android.dom.AndroidXmlReferenceProvider.areReferencesProvidedByReferenceProvider(AndroidXmlReferenceProvider.java:99)
at org.jetbrains.android.dom.AndroidXmlExtension.createTagNameReference(AndroidXmlExtension.java:42)
at com.intellij.psi.impl.source.xml.TagNameReference.createTagNameReference(TagNameReference.java:192)
at com.intellij.psi.impl.source.xml.XmlTagImpl.getReferences(XmlTagImpl.java:171)
at com.intellij.psi.impl.SharedPsiElementImplUtil.addReferences(SharedPsiElementImplUtil.java:67)
at com.intellij.psi.impl.SharedPsiElementImplUtil.findReferenceAt(SharedPsiElementImplUtil.java:49)
at com.intellij.psi.impl.SharedPsiElementImplUtil.findReferenceAt(SharedPsiElementImplUtil.java:63)
at com.intellij.psi.impl.source.tree.CompositePsiElement.findReferenceAt(CompositePsiElement.java:118)
at com.intellij.psi.SingleRootFileViewProvider.findReferenceAt(SingleRootFileViewProvider.java:418)
at com.intellij.psi.SingleRootFileViewProvider.findReferenceAt(SingleRootFileViewProvider.java:390)
at com.intellij.psi.impl.source.PsiFileImpl.findReferenceAt(PsiFileImpl.java:616)
at com.intellij.codeInsight.TargetElementUtilBase.findReference(TargetElementUtilBase.java:117)
at com.intellij.codeInsight.TargetElementUtilBase.getReferenceOrReferencedElement(TargetElementUtilBase.java:319)
at com.intellij.codeInsight.TargetElementUtil.getReferenceOrReferencedElement(TargetElementUtil.java:95)
at com.intellij.codeInsight.TargetElementUtilBase.findTargetElement(TargetElementUtilBase.java:201)
at com.intellij.codeInsight.TargetElementUtil.findTargetElement(TargetElementUtil.java:60)
at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.doCollectInformation(IdentifierHighlighterPass.java:91)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:67)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:438)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1098)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:429)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:452)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:426)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:402)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask.exec(JobLauncherImpl.java:202)
at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260)
at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858)
at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687)
at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642)
at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:109)
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:115)
at com.intellij.psi.stubs.StubIndexImpl.reportStubPsiMismatch(StubIndexImpl.java:534)
at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:155)
at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:134)
at com.intellij.psi.impl.java.stubs.index.JavaSuperClassNameOccurenceIndex.get(JavaSuperClassNameOccurenceIndex.java:49)
at com.intellij.psi.impl.search.JavaDirectInheritorsSearcher$5.compute(JavaDirectInheritorsSearcher.java:107)
at com.intellij.psi.impl.search.JavaDirectInheritorsSearcher$5.compute(JavaDirectInheritorsSearcher.java:104)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:884)
at com.intellij.psi.impl.search.JavaDirectInheritorsSearcher.execute(JavaDirectInheritorsSearcher.java:104)
at com.intellij.psi.impl.search.JavaDirectInheritorsSearcher.execute(JavaDirectInheritorsSearcher.java:49)
at com.intellij.util.ExecutorsQuery.processResults(ExecutorsQuery.java:43)
at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:75)
at com.intellij.util.UniqueResultsQuery.process(UniqueResultsQuery.java:66)
at com.intellij.util.UniqueResultsQuery.forEach(UniqueResultsQuery.java:56)
at com.intellij.psi.search.searches.ClassInheritorsSearch.processInheritors(ClassInheritorsSearch.java:287)
at com.intellij.psi.search.searches.ClassInheritorsSearch.access$100(ClassInheritorsSearch.java:46)
at com.intellij.psi.search.searches.ClassInheritorsSearch$1.execute(ClassInheritorsSearch.java:75)
at com.intellij.psi.search.searches.ClassInheritorsSearch$1.execute(ClassInheritorsSearch.java:53)
at com.intellij.util.ExecutorsQuery.processResults(ExecutorsQuery.java:43)
at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:75)
at com.intellij.util.UniqueResultsQuery.process(UniqueResultsQuery.java:66)
at com.intellij.util.UniqueResultsQuery.forEach(UniqueResultsQuery.java:56)
at org.jetbrains.android.facet.AndroidFacet.fillMap(AndroidFacet.java:1022)
at org.jetbrains.android.facet.AndroidFacet.computeClassMap(AndroidFacet.java:968)
at org.jetbrains.android.facet.AndroidFacet.access$500(AndroidFacet.java:116)
at org.jetbrains.android.facet.AndroidFacet$4.compute(AndroidFacet.java:924)
at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:49)
at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:200)
at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:38)
at org.jetbrains.android.facet.AndroidFacet.getClassMap(AndroidFacet.java:930)
at org.jetbrains.android.dom.AndroidDomExtender.getViewClassMap(AndroidDomExtender.java:425)
at org.jetbrains.android.dom.AndroidDomExtender.registerExtensionsForLayout(AndroidDomExtender.java:482)
at org.jetbrains.android.dom.AndroidDomExtender.processAttrsAndSubtags(AndroidDomExtender.java:624)
at org.jetbrains.android.dom.AndroidDomExtender.registerExtensions(AndroidDomExtender.java:830)
at org.jetbrains.android.dom.AndroidDomExtender.registerExtensions(AndroidDomExtender.java:78)
at com.intellij.util.xml.reflect.DomExtenderEP.extend(DomExtenderEP.java:62)
at com.intellij.util.xml.impl.DynamicGenericInfo.runDomExtenders(DynamicGenericInfo.java:164)
at com.intellij.util.xml.impl.DynamicGenericInfo.access$000(DynamicGenericInfo.java:49)
at com.intellij.util.xml.impl.DynamicGenericInfo$1.compute(DynamicGenericInfo.java:84)
at com.intellij.util.xml.impl.DynamicGenericInfo$1.compute(DynamicGenericInfo.java:81)
at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
at com.intellij.util.xml.impl.DynamicGenericInfo.checkInitialized(DynamicGenericInfo.java:81)
at com.intellij.util.xml.impl.DynamicGenericInfo.getCustomNameChildrenDescription(DynamicGenericInfo.java:195)
at com.intellij.util.xml.impl.DomSemContributor$5.fun(DomSemContributor.java:180)
at com.intellij.util.xml.impl.DomSemContributor$5.fun(DomSemContributor.java:161)
at com.intellij.semantic.SemServiceImpl$6$1.fun(SemServiceImpl.java:129)
at com.intellij.semantic.SemServiceImpl$6$1.fun(SemServiceImpl.java:125)
at com.intellij.semantic.SemServiceImpl.createSemElements(SemServiceImpl.java:216)
at com.intellij.semantic.SemServiceImpl.getSemElements(SemServiceImpl.java:186)
at com.intellij.semantic.SemService.getSemElement(SemService.java:37)
at com.intellij.util.xml.impl.DomManagerImpl.getDomHandler(DomManagerImpl.java:389)
at com.intellij.util.xml.impl.DomManagerImpl.getDomElement(DomManagerImpl.java:366)
at org.jetbrains.android.dom.AndroidDomElementDescriptorProvider.getDomElementAndBaseClassQName(AndroidDomElementDescriptorProvider.java:98)
at org.jetbrains.android.dom.AndroidXmlReferenceProvider.computeBaseClass(AndroidXmlReferenceProvider.java:113)
at org.jetbrains.android.dom.AndroidXmlReferenceProvider.areReferencesProvidedByReferenceProvider(AndroidXmlReferenceProvider.java:99)
at org.jetbrains.android.dom.AndroidXmlExtension.createTagNameReference(AndroidXmlExtension.java:42)
at com.intellij.psi.impl.source.xml.TagNameReference.createTagNameReference(TagNameReference.java:192)
at com.intellij.psi.impl.source.xml.XmlTagImpl.getReferences(XmlTagImpl.java:171)
at com.intellij.psi.impl.SharedPsiElementImplUtil.addReferences(SharedPsiElementImplUtil.java:67)
at com.intellij.psi.impl.SharedPsiElementImplUtil.findReferenceAt(SharedPsiElementImplUtil.java:49)
at com.intellij.psi.impl.SharedPsiElementImplUtil.findReferenceAt(SharedPsiElementImplUtil.java:63)
at com.intellij.psi.impl.source.tree.CompositePsiElement.findReferenceAt(CompositePsiElement.java:118)
at com.intellij.psi.SingleRootFileViewProvider.findReferenceAt(SingleRootFileViewProvider.java:418)
at com.intellij.psi.SingleRootFileViewProvider.findReferenceAt(SingleRootFileViewProvider.java:390)
at com.intellij.psi.impl.source.PsiFileImpl.findReferenceAt(PsiFileImpl.java:616)
at com.intellij.codeInsight.TargetElementUtilBase.findReference(TargetElementUtilBase.java:117)
at com.intellij.codeInsight.TargetElementUtilBase.getReferenceOrReferencedElement(TargetElementUtilBase.java:319)
at com.intellij.codeInsight.TargetElementUtil.getReferenceOrReferencedElement(TargetElementUtil.java:95)
at com.intellij.codeInsight.TargetElementUtilBase.findTargetElement(TargetElementUtilBase.java:201)
at com.intellij.codeInsight.TargetElementUtil.findTargetElement(TargetElementUtil.java:60)
at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.doCollectInformation(IdentifierHighlighterPass.java:91)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:67)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:438)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1098)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:429)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:452)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:426)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:402)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask.exec(JobLauncherImpl.java:202)
at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260)
at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858)
at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687)
at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642)
at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:109)
嘗試:File選單–>點Invalidate caches/restart 等重新載入完就解決了。
—–樂於分享,共同進步,歡迎補充
—–Any comments greatly appreciated
—–誠心歡迎各位交流討論!QQ:1138517609