Home » Android » ERROR :rendering problems The following classes could not be found android.support.v7.internal.widget.ActionBarOverlayLayout

ERROR :rendering problems The following classes could not be found android.support.v7.internal.widget.ActionBarOverlayLayout

Posted by: admin March 11, 2020 Leave a comment


I am just a beginner to android app development. When i created a new project on Android Studio 1.1.0,
it gives up this error
rendering problems
The following classes could not be found android.support.v7.internal.widget.ActionBarOverlayLayout

Now i have searched about this on google, and i found possibly 3 solutions given by most of the people.

They say:

  1. Either change the api (from preview window pane) from 22 to 21, or

  2. Change the App Theme from “Project Theme” to any other theme.

  3. be sure to have imported right appcompat-v7 library in your project structure -> dependencies,
    Refer these steps:
    Add the support library feature project identifier to the dependencies section. For example, to include the appcompat project add compile “com.android.support:appcompat-v7:18.0.+” to the dependencies section, as shown in the following example:

dependencies {
    compile "com.android.support:appcompat-v7:18.0.+" }

Note: My android support lib is up-to-date (installed it using SDK Manager).

Following first two steps, removed the error. But I feel that these are not the permanent solutions, the Second step seems just like a temporary workaround. I have doubts about the First step also, that if to remove the error, we change api from 22 to 21, then at the end, our app wont work in Android 5.1.1(API 22), it would be restricted to Android 5.0.1 and below only (API 21). Are my doubts valid?
Regarding the third step, is it the permanent solution to this problem?

P.S : Sorry for mismatching tags, wasn’t allowed to add exact tags due to site reputation

How to&Answers:

Fix res/values/styles.xml like so:

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

Detailed explanation as requested: Theme.AppCompat.Light.DarkActionBar is a subclass of the superclass Base anyway. Ctrl+click (Android Studio) on it and you will be taken to the source:

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

We didn’t change anything, we just defined it more precisely.


This is a known bug since Android Studio build 1.1 (it is also still in 1.2 and 1.3 preview). Switching the preview’s API level from 22 to 21 fixes the for most people. While waiting for a fix you could try it as well.

enter image description here

Originally answered here : Rendering problems in Android Studio v 1.1 / 1.2

Just reposting


Modify src/res/values/styles.xml

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

Then select API22, you’ll find this problem fixed!


After this error, I’m using :

API-22 Android 5.1.1 and still this problem exist.But you can at the top of the android studio toolbar, Choose:

Material Light -> Material Light

and then you can see the preview with Toolbar and light theme.

Hope this helps.


I fixed this problem by switching to the Holo Dark theme, then back to the App theme. I just clicked the button above the viewer that says App theme next to the rotate view in Android Studio. About 10% of the time, that alone doesn’t work and I also have to change the API of the viewer from 22 to 19.

No idea why this works, but the suggestions provided above did not work for me.


You don’t need to change the theme. Maybe your’re extending ActionBarActivity (deprecated) instead of just Activity. Change it, and build the project.


If you do change the activity from ActionBarActivity to just Activity, don’t forget to import the Activity itself. That is

import android.app.Activity

It sucks but hey, it’s their fault and not ours.

Also you can simply change the theme by pressing the “AppTheme” and choose Holo.Light.DarkActionBar. It updates the styles.xml file automatically.After that, rebuild the project.

I did all these and it works for me though i think them guys at Google and IntelliJ should do something about this rendering problem since we have been told to move from Eclipse to Android Studio