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:
Either change the api (from preview window pane) from 22 to 21, or
Change the App Theme from "Project Theme" to any other theme.
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
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.