2

在 Android Studio 中打开布局/xml 文件后,我总是收到此错误:

Throwable
         Expected only one value per-inputId
         Details: [org.jetbrains.android.AndroidValueResourcesIndex$MyResourceInfo@6ca07c6e]
         [org.jetbrains.android.AndroidValueResourcesIndex$MyResourceInfo@6ca09076]

这就是 Report to Google-Window/bug report-window 中显示的内容:

Expected only one value per-inputId
Details: [org.jetbrains.android.AndroidValueResourcesIndex$MyResourceInfo@6ca07c6e]
[org.jetbrains.android.AndroidValueResourcesIndex$MyResourceInfo@6ca09076]
java.lang.Throwable
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:124)
    at com.intellij.util.indexing.ValueContainerImpl.removeAssociatedValue(ValueContainerImpl.java:83)
    at com.intellij.util.indexing.ValueContainerMap$ValueContainerExternalizer.read(ValueContainerMap.java:111)
    at com.intellij.util.indexing.ValueContainerMap$ValueContainerExternalizer.read(ValueContainerMap.java:66)
    at com.intellij.util.io.PersistentHashMap.doGet(PersistentHashMap.java:427)
    at com.intellij.util.io.PersistentHashMap.get(PersistentHashMap.java:398)
    at com.intellij.util.indexing.MapIndexStorage$2$1.compute(MapIndexStorage.java:116)
    at com.intellij.util.indexing.MapIndexStorage$2$1.compute(MapIndexStorage.java:104)
    at com.intellij.util.indexing.ChangeTrackingValueContainer.getMergedData(ChangeTrackingValueContainer.java:117)
    at com.intellij.util.indexing.ChangeTrackingValueContainer.getValueIterator(ChangeTrackingValueContainer.java:77)
    at com.intellij.util.indexing.FileBasedIndexImpl$15.convert(FileBasedIndexImpl.java:982)
    at com.intellij.util.indexing.FileBasedIndexImpl$15.convert(FileBasedIndexImpl.java:957)
    at com.intellij.util.indexing.FileBasedIndexImpl.processExceptions(FileBasedIndexImpl.java:932)
    at com.intellij.util.indexing.FileBasedIndexImpl.processValuesImpl(FileBasedIndexImpl.java:1003)
    at com.intellij.util.indexing.FileBasedIndexImpl.processValues(FileBasedIndexImpl.java:912)
    at org.jetbrains.android.resourceManagers.ResourceManager.findValueResourceInfos(ResourceManager.java:496)
    at org.jetbrains.android.resourceManagers.ResourceManager.collectLazyResourceElements(ResourceManager.java:466)
    at org.jetbrains.android.dom.converters.AndroidResourceReferenceBase.collectTargets(AndroidResourceReferenceBase.java:131)
    at org.jetbrains.android.dom.converters.AndroidResourceReferenceBase.resolveInner(AndroidResourceReferenceBase.java:95)
    at org.jetbrains.android.dom.converters.AndroidResourceReferenceBase.access$000(AndroidResourceReferenceBase.java:31)
    at org.jetbrains.android.dom.converters.AndroidResourceReferenceBase$1.resolve(AndroidResourceReferenceBase.java:86)
    at org.jetbrains.android.dom.converters.AndroidResourceReferenceBase$1.resolve(AndroidResourceReferenceBase.java:82)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:103)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:131)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:123)
    at org.jetbrains.android.dom.converters.AndroidResourceReferenceBase.multiResolve(AndroidResourceReferenceBase.java:81)
    at com.intellij.psi.PsiReferenceBase$Poly.resolve(PsiReferenceBase.java:180)
    at com.intellij.util.xml.DeprecatedClassUsageInspection.checkReferences(DeprecatedClassUsageInspection.java:64)
    at com.intellij.util.xml.DeprecatedClassUsageInspection.access$000(DeprecatedClassUsageInspection.java:33)
    at com.intellij.util.xml.DeprecatedClassUsageInspection$1.visitXmlAttributeValue(DeprecatedClassUsageInspection.java:55)
    at com.intellij.psi.impl.source.xml.XmlAttributeValueImpl.accept(XmlAttributeValueImpl.java:55)
    at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:74)
    at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:63)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.runToolOnElements(LocalInspectionsPass.java:358)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.access$000(LocalInspectionsPass.java:77)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$3.process(LocalInspectionsPass.java:327)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$3.process(LocalInspectionsPass.java:324)
    at com.intellij.concurrency.JobLauncherImpl$1$1.run(JobLauncherImpl.java:55)
    at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
    at com.intellij.concurrency.JobLauncherImpl$1.run(JobLauncherImpl.java:49)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:32)
    at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:72)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1171)
    at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:99)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)



java.lang.Throwable
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:124)
    at com.intellij.util.indexing.ValueContainerImpl.removeAssociatedValue(ValueContainerImpl.java:83)
    at com.intellij.util.indexing.ValueContainerMap$ValueContainerExternalizer.read(ValueContainerMap.java:111)
    at com.intellij.util.indexing.ValueContainerMap$ValueContainerExternalizer.read(ValueContainerMap.java:66)
    at com.intellij.util.io.PersistentHashMap.doGet(PersistentHashMap.java:427)
    at com.intellij.util.io.PersistentHashMap.get(PersistentHashMap.java:398)
    at com.intellij.util.indexing.MapIndexStorage$2$1.compute(MapIndexStorage.java:116)
    at com.intellij.util.indexing.MapIndexStorage$2$1.compute(MapIndexStorage.java:104)
    at com.intellij.util.indexing.ChangeTrackingValueContainer.getMergedData(ChangeTrackingValueContainer.java:117)
    at com.intellij.util.indexing.ChangeTrackingValueContainer.getValueIterator(ChangeTrackingValueContainer.java:77)
    at com.intellij.util.indexing.FileBasedIndexImpl$15.convert(FileBasedIndexImpl.java:982)
    at com.intellij.util.indexing.FileBasedIndexImpl$15.convert(FileBasedIndexImpl.java:957)
    at com.intellij.util.indexing.FileBasedIndexImpl.processExceptions(FileBasedIndexImpl.java:932)
    at com.intellij.util.indexing.FileBasedIndexImpl.processValuesImpl(FileBasedIndexImpl.java:1003)
    at com.intellij.util.indexing.FileBasedIndexImpl.processValues(FileBasedIndexImpl.java:912)
    at org.jetbrains.android.resourceManagers.ResourceManager.findValueResourceInfos(ResourceManager.java:496)
    at org.jetbrains.android.resourceManagers.ResourceManager.collectLazyResourceElements(ResourceManager.java:466)
    at org.jetbrains.android.dom.converters.AndroidResourceReferenceBase.collectTargets(AndroidResourceReferenceBase.java:131)
    at org.jetbrains.android.dom.converters.AndroidResourceReferenceBase.resolveInner(AndroidResourceReferenceBase.java:95)
    at org.jetbrains.android.dom.converters.AndroidResourceReferenceBase.access$000(AndroidResourceReferenceBase.java:31)
    at org.jetbrains.android.dom.converters.AndroidResourceReferenceBase$1.resolve(AndroidResourceReferenceBase.java:86)
    at org.jetbrains.android.dom.converters.AndroidResourceReferenceBase$1.resolve(AndroidResourceReferenceBase.java:82)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:103)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:131)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:123)
    at org.jetbrains.android.dom.converters.AndroidResourceReferenceBase.multiResolve(AndroidResourceReferenceBase.java:81)
    at com.intellij.psi.PsiReferenceBase$Poly.resolve(PsiReferenceBase.java:180)
    at com.intellij.util.xml.DeprecatedClassUsageInspection.checkReferences(DeprecatedClassUsageInspection.java:64)
    at com.intellij.util.xml.DeprecatedClassUsageInspection.access$000(DeprecatedClassUsageInspection.java:33)
    at com.intellij.util.xml.DeprecatedClassUsageInspection$1.visitXmlAttributeValue(DeprecatedClassUsageInspection.java:55)
    at com.intellij.psi.impl.source.xml.XmlAttributeValueImpl.accept(XmlAttributeValueImpl.java:55)
    at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:74)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$5.process(LocalInspectionsPass.java:382)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$5.process(LocalInspectionsPass.java:377)
    at com.intellij.concurrency.JobLauncherImpl$1$1.run(JobLauncherImpl.java:55)
    at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
    at com.intellij.concurrency.JobLauncherImpl$1.run(JobLauncherImpl.java:49)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:32)
    at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:72)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1171)
    at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:99)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)



java.lang.Throwable
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:124)
    at com.intellij.util.indexing.ValueContainerImpl.removeAssociatedValue(ValueContainerImpl.java:83)
    at com.intellij.util.indexing.ValueContainerMap$ValueContainerExternalizer.read(ValueContainerMap.java:111)
    at com.intellij.util.indexing.ValueContainerMap$ValueContainerExternalizer.read(ValueContainerMap.java:66)
    at com.intellij.util.io.PersistentHashMap.doGet(PersistentHashMap.java:427)
    at com.intellij.util.io.PersistentHashMap.get(PersistentHashMap.java:398)
    at com.intellij.util.indexing.MapIndexStorage$2$1.compute(MapIndexStorage.java:116)
    at com.intellij.util.indexing.MapIndexStorage$2$1.compute(MapIndexStorage.java:104)
    at com.intellij.util.indexing.ChangeTrackingValueContainer.getMergedData(ChangeTrackingValueContainer.java:117)
    at com.intellij.util.indexing.ChangeTrackingValueContainer.getValueIterator(ChangeTrackingValueContainer.java:77)
    at com.intellij.util.indexing.FileBasedIndexImpl$15.convert(FileBasedIndexImpl.java:982)
    at com.intellij.util.indexing.FileBasedIndexImpl$15.convert(FileBasedIndexImpl.java:957)
    at com.intellij.util.indexing.FileBasedIndexImpl.processExceptions(FileBasedIndexImpl.java:932)
    at com.intellij.util.indexing.FileBasedIndexImpl.processValuesImpl(FileBasedIndexImpl.java:1003)
    at com.intellij.util.indexing.FileBasedIndexImpl.processValues(FileBasedIndexImpl.java:912)
    at org.jetbrains.android.resourceManagers.ResourceManager.findValueResourceInfos(ResourceManager.java:496)
    at org.jetbrains.android.resourceManagers.ResourceManager.collectLazyResourceElements(ResourceManager.java:466)
    at org.jetbrains.android.dom.converters.AndroidResourceReferenceBase.collectTargets(AndroidResourceReferenceBase.java:131)
    at org.jetbrains.android.dom.converters.AndroidResourceReferenceBase.resolveInner(AndroidResourceReferenceBase.java:95)
    at org.jetbrains.android.dom.converters.AndroidResourceReferenceBase.access$000(AndroidResourceReferenceBase.java:31)
    at org.jetbrains.android.dom.converters.AndroidResourceReferenceBase$1.resolve(AndroidResourceReferenceBase.java:86)
    at org.jetbrains.android.dom.converters.AndroidResourceReferenceBase$1.resolve(AndroidResourceReferenceBase.java:82)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:103)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:131)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:123)
    at org.jetbrains.android.dom.converters.AndroidResourceReferenceBase.multiResolve(AndroidResourceReferenceBase.java:81)
    at com.intellij.psi.PsiReferenceBase$Poly.resolve(PsiReferenceBase.java:180)
    at com.intellij.util.xml.DeprecatedClassUsageInspection.checkReferences(DeprecatedClassUsageInspection.java:64)
    at com.intellij.util.xml.DeprecatedClassUsageInspection.access$000(DeprecatedClassUsageInspection.java:33)
    at com.intellij.util.xml.DeprecatedClassUsageInspection$1.visitXmlAttributeValue(DeprecatedClassUsageInspection.java:55)
    at com.intellij.psi.impl.source.xml.XmlAttributeValueImpl.accept(XmlAttributeValueImpl.java:55)
    at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:74)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$5.process(LocalInspectionsPass.java:382)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$5.process(LocalInspectionsPass.java:377)
    at com.intellij.concurrency.JobLauncherImpl$1$1.run(JobLauncherImpl.java:55)
    at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
    at com.intellij.concurrency.JobLauncherImpl$1.run(JobLauncherImpl.java:49)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:32)
    at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:72)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1171)
    at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:99)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)

那是“只是”一个普通的 Android Studio 错误还是我的布局文件有问题?

4

0 回答 0