我正在使用Android Studio版本1.2.2,并且在我的某个活动xml的设计视图中,我收到此错误弹出窗口。
com.intellij.openapi.project.IndexNotReadyException: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation
at com.intellij.util.indexing.FileBasedIndexImpl.handleDumbMode(FileBasedIndexImpl.java:854)
at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:803)
at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:787)
at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:250)
at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:238)
at com.intellij.psi.stubs.StubIndex.process(StubIndex.java:76)
at com.intellij.psi.stubs.StubIndex.process(StubIndex.java:95)
at com.intellij.psi.stubs.StubIndexImpl.get(StubIndexImpl.java:227)
at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:144)
at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:134)
at com.intellij.psi.impl.java.stubs.index.JavaFullClassNameIndex.get(JavaFullClassNameIndex.java:48)
at com.intellij.psi.impl.file.impl.JavaFileManagerImpl.findClassInIndex(JavaFileManagerImpl.java:145)
at com.intellij.psi.impl.file.impl.JavaFileManagerImpl.findClass(JavaFileManagerImpl.java:138)
at com.intellij.psi.impl.PsiElementFinderImpl.findClass(PsiElementFinderImpl.java:54)
at com.intellij.psi.impl.JavaPsiFacadeImpl.findClass(JavaPsiFacadeImpl.java:99)
at org.jetbrains.android.uipreview.ModuleClassLoader$1.compute(ModuleClassLoader.java:234)
at org.jetbrains.android.uipreview.ModuleClassLoader$1.compute(ModuleClassLoader.java:226)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:890)
at org.jetbrains.android.uipreview.ModuleClassLoader.isSourceModified(ModuleClassLoader.java:226)
at org.jetbrains.android.uipreview.ViewLoader.checkModified(ViewLoader.java:169)
at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:104)
at com.android.tools.idea.rendering.LayoutlibCallback.loadView(LayoutlibCallback.java:177)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:207)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:132)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:806)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:782)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:400)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:332)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:350)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:497)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:485)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:894)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:485)
at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:590)
at com.intellij.android.designer.designSurface.AndroidDesignerEditorPanel$6.run(AndroidDesignerEditorPanel.java:480)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:351)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:745)
我已经完成并更改了API版本,因为过去有很多其他人遇到与我类似的问题,但它并不想改变它。我还检查了我的清单设置的版本,其minSDK是15,目标是21
在xml中有3个视图,一个文本视图,一个自定义表面视图和一个自定义glSurfaceView。我不确定这是否与我的自定义表面视图直接相关,而不是我想要它的工作方式(目前它只是全黑)。
我的问题是,我到底在做什么?它必须是非常微不足道的事情,它几乎不值得人们花时间,因为我似乎无法找到任何关于此的信息,除了旧帖子关于以前的API和修复似乎没有工作。如果这是可以解决的并且已经在之前的帖子中完成,我将尽快删除。
答案 0 :(得分:0)
感谢Juro提供这个答案:Rendering problems - Android Studio
第二天我没有再收到错误我认为我最终做的有效的答案就是答案。问题解决了