I have imported appcompat library through:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:+'
compile 'com.android.support:support-v4:+'
}
in my {ProjectName}/{ModuleName}/build.gradle. The library shows up in external libraries. Yet, I can't build the app because when I try, there's an error in my styles.xml:
Error:Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'
This is where I declare a theme to derive from AppCompat theme, like this:
<style name="TextStyleSuperClass" parent="@style/Theme.AppCompat.Light">
</style>
Do you know how to fix this?
On this site "Getting ActionBar support library working with Android Studio" I'v found the following line and added it to the activity in the AndroidManifest.xml
:
android:theme="@style/Theme.AppCompat.Light"
From that on Android Studio was able to resolve Theme.AppCompat
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With