title: Class "android.support.v4.view.ViewPager" could not be instantiated
body: <p>I'm having some troubles including the Android Support Library.
  I've already installed the support library and the support repository and I included the "compile" directive in the build.gradle file inside the app folder (as explained in <a href="https://developer.android.com/tools/support-library/setup.html" rel="nofollow">https://developer.android.com/tools/support-library/setup.html</a>).
  Although the Gradle builds without errors, I found that the Render Preview of the XML code gives me the following error:</p>
  
  <pre><code>Rendering Problems The following classes could not be instantiated:
  - android.support.v4.view.ViewPager (Open Class, Show Exception)
  </code></pre>
  
  <p>The exception stack: </p>
  
  <pre><code>java.lang.ClassNotFoundException: android.support.v4.view.ViewConfigurationCompat$HoneycombViewConfigurationVersionImpl
      at com.android.tools.idea.rendering.RenderClassLoader.findClass(RenderClassLoader.java:53)
      at org.jetbrains.android.uipreview.ProjectClassLoader.findClass(ProjectClassLoader.java:56)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:471)
      at com.android.tools.idea.rendering.RenderClassLoader.loadClassFromJar(RenderClassLoader.java:93)
      at org.jetbrains.android.uipreview.ProjectClassLoader.loadClassFromModuleOrDependency(ProjectClassLoader.java:108)
      at org.jetbrains.android.uipreview.ProjectClassLoader.load(ProjectClassLoader.java:89)
      at com.android.tools.idea.rendering.RenderClassLoader.findClass(RenderClassLoader.java:56)
      at org.jetbrains.android.uipreview.ProjectClassLoader.findClass(ProjectClassLoader.java:56)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      at android.support.v4.view.ViewConfigurationCompat.&lt;clinit&gt;(ViewConfigurationCompat.java:87)
      at android.support.v4.view.ViewPager.initViewPager(ViewPager.java:367)
      at android.support.v4.view.ViewPager.&lt;init&gt;(ViewPager.java:355)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:375)
      at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:100)
      at com.android.tools.idea.rendering.LayoutlibCallback.loadView(LayoutlibCallback.java:172)
      at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:207)
      at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:132)
      at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802)
      at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
      at android.view.LayoutInflater.rInflate(LayoutInflater.java:778)
      at android.view.LayoutInflater.inflate(LayoutInflater.java:500)
      at android.view.LayoutInflater.inflate(LayoutInflater.java:381)
      at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:400)
      at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:329)
      at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:332)
      at com.android.tools.idea.rendering.RenderService$3.compute(RenderService.java:575)
      at com.android.tools.idea.rendering.RenderService$3.compute(RenderService.java:564)
      at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:932)
      at com.android.tools.idea.rendering.RenderService.createRenderSession(RenderService.java:564)
      at com.android.tools.idea.rendering.RenderService.render(RenderService.java:691)
      at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.doRender(AndroidLayoutPreviewToolWindowManager.java:604)
      at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.access$1900(AndroidLayoutPreviewToolWindowManager.java:80)
      at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7$1.run(AndroidLayoutPreviewToolWindowManager.java:546)
      at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
      at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
      at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
      at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
      at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7.run(AndroidLayoutPreviewToolWindowManager.java:541)
      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:327)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      at java.lang.Thread.run(Thread.java:695)
  </code></pre>
  
  <p>Strange thing is that it looks like there are problems with a HoneyComb library, but I'm using Android L APK, so it shouldn't give me that kind of error at all</p>