I encountered a problem when creating a project in Android Studio. (Version 1.5.1)
I describe my actions step-by-step:
I had a similar problem with Android Studio 1.5.1 in Windows 10. The preview was not working no matter what version of Android was selected. The stacktrace starts with:
"java.lang.NoSuchMethodError: com.android.ide.common.rendering.api.LayoutlibCallback.getXmlFileParser(Ljava/lang/String;)Lorg/xmlpull/v1/XmlPullParser;"
When I remove the attribute tools:showIn="@layout/activity_main"
from the RelativeLayout
the problem resolves for all Android versions except "N".
I have Android 2.2, 2.3.3, 5.0.1 and 6.0 enabled
I can't explain why the action resolves the problem though or why it does work for version N.