I've been using Android Studio 0.8.6 to develop apps and am having problems with the layout preview when using API21. I get the following error:
Rendering Problems: The following classes could not be instantiated: - android.support.v7.widget.Toolbar
I have SDK Build tools up-to-date (21.0.2) as well as the full API21 downloaded and installed. My targetSDKVersion is set to 21 on the gradle file. If I change the preview to render with API20, everything seems fine. Exception details are provided below.
Thanks!
Exception Details java.lang.ClassNotFoundException: android.support.v4.content.ContextCompatApi21 at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:148) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:319) at android.support.v7.internal.widget.TintManager.getDrawable(TintManager.java:133) at android.support.v7.internal.widget.TintTypedArray.getDrawable(TintTypedArray.java:62) at android.support.v7.widget.Toolbar.(Toolbar.java:248) at android.support.v7.widget.Toolbar.(Toolbar.java:190) at java.lang.reflect.Constructor.newInstance(Constructor.java:408) 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)