`

ERROR :rendering problems The following classes could not be found android.suppo

 
阅读更多

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

 

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

shareimprove this question
 
    
Thanks for self answering question. Changing the theme worked for me –  eMAD May 1 at 8:13
    
@eMAD :D Thats just a temporary solution man!! I hope somebody gives us a permanent answer! – Ashish Goyal May 2 at 9:22
    
For me, even the first two steps don't solve the problem... I'm getting "rendering problems" with all layouts that have views from android.support.*. This is frustrating! –  user1987392 May 2 at 17:09

5 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 didnt change anything, we just defined it more precisesly.

shareimprove this answer
 
1  
This answer could benefit from a sentence. –  Josh C May 3 at 17:18
    
Could you please share why it has to be done this way or point to the resource? –  Pejs May 4 at 0:43
    
Expanded my answer. Inheritance between classes is a fundamental part of Java. –  eee May 4 at 1:04
    
Wow, what a lame out of box experience in Android Studio. –  Warren P May 17 at 4:09

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!

shareimprove this answer
 
    
works fine, thnx a lot –  Ivan Black May 17 at 7:46

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

shareimprove this answer
 

La solucion a este problema es facil simplemente tienes que actualizar tu SDK, abre sdk manager instala todos los tool, extras y actualizaciones que tengas pendientes una vez instalado cierra y abre el android studio y tu problema se solucionado

shareimprove this answer
 
    
post your question in english please.. –  bakriOnFire May 20 at 12:41 

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

shareimprove this answer
分享到:
评论

相关推荐

    FlexGraphics_V_1.79_D4-XE10.2_Downloadly.ir

    - FIX: In "Windows ClearType" font rendering mode (OS Windows mode) the "garbage" pixels can appear from the right and from the bottom sides of the painted rectangle of the TFlexText object....

    ubuntu上在androidstudio中启动emulator闪退的解决方法

    `emulator: ERROR: Could not initialize OpenglES emulation, use '-gpu off' to disable it.` 解决方法 从错误提示中,我们可以看到有两种解决方法: 1. 设置 `-gpu swiftshader` 2. 设置 `-gpu off` 在运行...

    Hello Android.rar

    Hello Android (3rd Edition),英文书籍,适用于android入门 ! Android is an open source software toolkit for mobile phones that was created by Google and the Open Handset Alliance. It’s inside ...

    EurekaLog_7.5.0.0_Enterprise

    7)....Fixed: Generic names with "," could not be decoded in Viewer 8)....Fixed: Updated Windows 10 detection for latest builds of Windows 10 9)....Fixed: Sleep and hybernation no longer trigger false-...

    OpenGL ES 2 for Android.pdf

    The book walks through the process of creating a basic OpenGL ES 2 application on Android, including initializing OpenGL ES, rendering simple shapes, and handling user input. 3. **Advanced Graphics ...

    Building.Android.UIs.with.Custom.Views

    By the end of this book, you will be able to create apps with custom views that are responsive and adaptable to make your app distinctive and an instant hit with its users. What you will learn Extend...

    GPU Pro: Advanced Rendering Techniques (1/3)

    Brought to you by Wolfgang Engel and the same team of editors who made the ShaderX series a success, this volume covers advanced rendering techniques, engine design, GPGPU techniques, related ...

    GPU Pro: Advanced Rendering Techniques (3/3)

    Brought to you by Wolfgang Engel and the same team of editors who made the ShaderX series a success, this volume covers advanced rendering techniques, engine design, GPGPU techniques, related ...

    javaee API

    javax.faces.render Classes and interfaces defining the rendering model. javax.faces.validator Interface defining the validator model, and concrete validator implementation classes. javax.faces....

    acpi控制笔记本风扇转速

    could be incorrectly generated if the parent ResourceTemplate pathname places the template within a different namespace scope than the current scope. (BZ 7212) Fixed a problem where the compiler ...

    developing android application with adobe air.part3.rar

    Installing the AIR Runtime on an Android Device What Is in the AIR SDK New ActionScript Libraries AIR on the Desktop Versus AIR on Android Mobile Flash Player 10.1 Versus AIR 2.6 on Android Chapter 2 ...

    GPU Pro 5 Advanced Rendering Techniques 7z.pdf

    aabb box The GPU Pro: Advanced Rendering Techniques book series covers ready-touse ideas and procedures that can help to solve many of your daily graphicsprogramming challenges. The fifth book in the ...

    Amazon

    What this basically means is that each developer can access the information from Amazon following some simple protocols and every site owner can enhance his own website with content and features from...

    Csharp.6.0.and.the.NET.4.6.Framework.7th.Edition.1484213335.epub

    This new 7th edition of Pro C# 6.0 and the .NET 4.6 Platform has been completely revised and rewritten to reflect the latest changes to the C# language specification and new advances in the .NET ...

    Google.Android.SDK开发范例大全

    《Google.Android.SDK开发范例大全》是一本专为Android开发者准备的详尽指南,它涵盖了使用Google Android SDK进行应用程序开发的各种实例和最佳实践。通过这本书,开发者可以深入了解Android平台的特性和功能,学习...

    GPU.Pro.6.Advanced.Rendering.Techniques.148226461

    The latest edition of this bestselling game development reference offers proven tips and techniques for the real-time rendering of special effects and visualization data that are useful for beginners ...

    FairyGUI-Unity-Plugin-3.4.0.zip

    -------------------- FairyGUI ...Version 3.4.0 ...-------------------- FairyGUI is a flexible UI framework for Unity, working with the professional FREE Game UI ...- FIXED: Fixed a bug of skew rendering.

Global site tag (gtag.js) - Google Analytics