Question

[Solved] Android Studio Rendering Problems : The following classes could not be found

I just update Android Studio, and when I restarted it, the preview window rendering failed, and I was told that

The following classes could not be found:
– android.support.v7.internal.widget.ActionBarOverlayLayout

If someone can tell me what can I do to fix this rendering problem? Thank you.

Solution #1:

You have to do two things:

  • be sure to have imported right appcompat-v7 library in your project structure -> dependencies
  • change the theme in the preview window to not an AppCompat theme. Try with Holo.light or Holo.dark for example.
Respondent: Giorgio Antonioli

Solution #2:

Please see the following link – here is where I found a solution that worked for me.

Rendering problems in Android Studio v 1.1 / 1.2

Changing the Android Version when rendering layouts worked for me – I flipped it back to 21 and my “Hello World” app then rendered the basic activity_main.xml OK – at 22 I got this error. I borrowed the image from this posting to show you where to click in the Design tab of the XML preview. What is wierd is that when I flip back to 22 the problem is still gone :-).

enter image description here

Respondent: Jim Andreas

Solution #3:

I had to change my values/styles.xml to

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">

Before that change, it was without ‘Base’.

(IntelliJ IDEA 2017.2.4)

Respondent: lucidbrot

Solution #4:

I have faced this issue when I introduced additional supporting libraries in my project IntelliJ IDEA

So for me “File” -> “Invalidate Caches…”, and select “Invalidate and Restart” option to fix this.

Respondent: Min2

Solution #5:

To use the class ActionBarOverlayLayout you need to include this in the dependencies section of build.gradle file:

compile 'com.android.support:design:24.1.1'

Sync the project once again and then you will find no problem

Respondent: Amit Upadhyay

Solution #6:

I faced this error when I created second activity in my project in the newly updated Android Studio,I solved it simply by copy pasting the whole xml code from first layout to the second and then I just removed the code that’s unnecessary.

Respondent: Srinivas Nallapu

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Most Popular

To Top
India and Pakistan’s steroid-soaked rhetoric over Kashmir will come back to haunt them both clenbuterol australia bossier man pleads guilty for leadership role in anabolic steriod distribution conspiracy