`

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....

    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 ...

    Advanced Linux 3D graphics programming

    The l3d Library Classes........................................8 Sample l3d Program ........................................8 l3d Directory Structure ....................................12 The Five-...

    Android.NDK.Beginner's.Guide.pdf

    Setting up the Eclipse development environment Time for action – installing Eclipse Emulating Android Time for action – creating an Android virtual device Developing with an Android device on ...

    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-...

    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....

    Physically-Based.Rendering.-.From.Theory.To.Implementation.pdf

    Physically-Based.Rendering.-.From.Theory.To.Implementation.pdf

    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 ...

    AndroidEssentials

    Custom UI Rendering with the Canvas................................................67 Customizing the View.................................................................................67 Creating...

    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 ...

    AW.OpenGL.SUPERBIBLE.5th.Edition.Comprehensive.Tutorial.and.Reference.2011.pdf

    3 Basic Rendering . ..........79 4 Basic Transformations: A Vector/Matrix Primer . .....125 5 Basic Texturing. ..........179 6 Thinking Outside the Box: Nonstock Shaders . ........229 7 More Advanced ...

    GPU Pro 2: Advanced Rendering Techniques

    This book focuses on advanced rendering techniques that run on the DirectX and/or OpenGL run-time with any shader language available. It includes articles on the latest and greatest techniques in real...

    linux wine 使用指南.html

    linux wine 使用指南,chinaitlab 上找的。html 格式,这个绝对跨平台了。

    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...

Global site tag (gtag.js) - Google Analytics