Error :Rendering Problems the Following Classes Could Not Be Found Android.Support.V7.Internal.Widget.Actionbaroverlaylayout

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

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.

java.lang.NoClassDefFoundError: android/support/v7/internal/widget/ActionBarOverlayLayout$1

Sometimes Android Studio has some rendering problems, so you could do three things in this situation:

Firstly: be sure to have imported right appcompat-v7 library in your project structure (in your dependencies)

Secondly: change the AppTheme in the preview window to NOT an AppCompat theme. You could try with some Holo themes, for example Holo.light or Holo.dark.

Thirdly: You could change the Android Version when rendering layouts - for example, you could get it back to API level 21

Rendering Problems - Following Classes Not Found

I wiped out my entire project and started all over again. That seemed to solve the problem. I'm guessing changing my configurations in between is what caused the mess. Thank goodness the project was just for recreation.

Rendering Problems with NoActionBar Theme. The following classes could not be found: android.support.v7.widget.AppCompatTextView

It is a minor bug in appcompat v26.

In your styles.xml use Base.Theme.AppCompat instead of Theme.AppCompat as the parent theme.

Apparently there is no such theme for NoActionBar in Base. So use a theme as below:

<style name="AppTheme" parent="Base.Theme.AppCompat.Light">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>

<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>

The following classes could not be instantiated with android.support.v7.widget.AppCompatTextView

I was getting this error too and tried to fix it by cleaning, rebuilding and invalidating the cache many times.
What fixed it for me was changing the parent theme in res/values/styles.xml to one with Base e.g.

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

as per the answer here.

Android Studio Rendering Problems (No preview)

Changing AppTheme parent in res/values/styles.xml resolved this problem. Replace

  <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>

with

<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>

Downgrade API level from 22 to 21 in Preview Pane

enter image description here



Related Topics



Leave a reply



Submit