2

I'm using Android Studio Version 1.2.2 and in the design view for one of my activity xml's I am getting this error popup.

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)

I've already gone through and changed the API version as what is suggested by tons of other people who have had issues similar to me in the past but it doesn't want to change it. I've also checked to see what version my manifest is set at and its minSDK is 15 and target is 21

API version change

In the xml there are 3 views, a text view, a custom surface view and a custom glSurfaceView. I'm not sure if this is directly linked to my custom surface view not working how I want it to (currently its just fully black).

My Question is, what on earth am I doing wrong? It has to be something so utterly trivial that it barely even worth people's time because I can't seem to find any information on this apart from old posts about previous APIs and fixes which don't seem to work. If this is solveable and has already been done in a previous post I'll delete this ASAP.

Matt
  • 59
  • 1
  • 4
  • Have you checked on the GPU accelaration when creating AVD? http://stackoverflow.com/a/11178101/2075318 – vaske Jun 26 '15 at 23:44
  • @cutoff I'm not using an AVD. I'm using a Nexus 7 to test my builds on although this error comes up when I'm in android studio on the design view of my xml which contains the custom glSurfaceView, the custom SurfaceView and the TextView – Matt Jun 27 '15 at 09:36
  • I had similar problem. this answer solved it for me: http://stackoverflow.com/a/29203749/555762 – Uroš Podkrižnik Jun 28 '15 at 11:13

1 Answers1

0

Thanks to Juro for providing this answer: Rendering problems - Android Studio

I wasn't getting the error anymore the next day I presume I ended up doing effectively the same thing that the answer says. Problem solved

Community
  • 1
  • 1
Matt
  • 59
  • 1
  • 4