ArrayIndexOutOfBoundsException in Android Studio (Not code - the application)
<p>Im getting an error in Android Studio: </p>

<p>Stacktrace:</p>

<pre><code>java.lang.ArrayIndexOutOfBoundsException: 82277
at org.jetbrains.org.objectweb.asm.ClassReader.readInt(ClassReader.java:2350)
at org.jetbrains.org.objectweb.asm.ClassReader.getAttributes(ClassReader.java:2201)
at org.jetbrains.org.objectweb.asm.ClassReader.accept(ClassReader.java:565)
at org.jetbrains.org.objectweb.asm.ClassReader.accept(ClassReader.java:506)
at com.android.tools.idea.rendering.ClassConverter.rewriteClass(ClassConverter.java:184)
at com.android.tools.idea.rendering.ClassConverter.rewriteClass(ClassConverter.java:77)
at com.android.tools.idea.rendering.RenderClassLoader.convertClass(RenderClassLoader.java:151)
at com.android.tools.idea.rendering.RenderClassLoader.loadClass(RenderClassLoader.java:135)
at com.android.tools.idea.rendering.RenderClassLoader.loadClassFile(RenderClassLoader.java:116)
at org.jetbrains.android.uipreview.ModuleClassLoader.loadClassFile(ModuleClassLoader.java:341)
at org.jetbrains.android.uipreview.ModuleClassLoader.loadClassFromModule(ModuleClassLoader.java:245)
at org.jetbrains.android.uipreview.ModuleClassLoader.loadClassFromModuleOrDependency(ModuleClassLoader.java:206)
at org.jetbrains.android.uipreview.ModuleClassLoader.load(ModuleClassLoader.java:150)
at com.android.tools.idea.rendering.RenderClassLoader.findClass(RenderClassLoader.java:54)
at org.jetbrains.android.uipreview.ModuleClassLoader.findClass(ModuleClassLoader.java:90)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.jetbrains.android.uipreview.ModuleClassLoader.loadClass(ModuleClassLoader.java:193)
at java.lang.Class.getDeclaredClasses0(Native Method)
at java.lang.Class.getDeclaredClasses(Class.java:1867)
at org.jetbrains.android.uipreview.ViewLoader.parseClass(ViewLoader.java:562)
at org.jetbrains.android.uipreview.ViewLoader.loadAndParseRClass(ViewLoader.java:546)
at org.jetbrains.android.uipreview.ViewLoader.loadAndParseRClassSilently(ViewLoader.java:502)
at com.android.tools.idea.rendering.LayoutlibCallbackImpl.loadAndParseRClass(LayoutlibCallbackImpl.java:676)
at com.android.tools.idea.rendering.RenderTask.&lt;init&gt;(RenderTask.java:164)
at com.android.tools.idea.rendering.RenderService.createTask(RenderService.java:236)
at com.android.tools.idea.uibuilder.model.NlModel.inflate(NlModel.java:345)
at com.android.tools.idea.uibuilder.model.NlModel.updateModel(NlModel.java:406)
at com.android.tools.idea.uibuilder.model.NlModel$2.run(NlModel.java:259)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:333)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:323)
at com.intellij.util.ui.update.MergingUpdateQueue$3.run(MergingUpdateQueue.java:267)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:282)
at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:234)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:378)
at com.intellij.util.Alarm$Request.run(Alarm.java:389)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:227)
at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:187)
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)
</code></pre>

<p>This happens when i want to Preview layouts in Android studio.</p>

<p>I just updated to 2.2.2.</p>

<p>This was working fine before i updated and when i try and change the Version used in the preview back to 23 from 25 it still doesnt work?
Has anyone got any ideas?</p>