While creating a new android project using Android Studio I came across a Rendering error when I try to open the ‘Design tab’ on any layout xml file.

Rendering Error
Rendering Error – Classes could not be found.

Open up the styles.xml file. It would be under res/values/ folder in your app directory.

Change the following line

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">


<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">

Here, we have added Base as the superclass for this particular theme as defined in the values.xml under the build/ directory.

<style name="Base.Theme.AppCompat.Light.DarkActionBar" parent="Base.Theme.AppCompat.Light">

Other Solutions:
1. Change the theme by selecting the ‘Design’ tab of your layout xml. Then click on App Theme and select the appropriate theme you want.
2. Modify the styles.xml file as following and select the appropriate API level.

<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar"></style>

Let the Windows be open, and feel the Freedom.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s