How to use properly Android Support Library because i have this error in my manifest file:
android:theme="@style/Theme.AppCompat.Light.DarkActionBar"
error: Error: No resource found that matches the given name
(at 'theme' with value '@style/Theme.AppCompat.Light.DarkActionBar').
AndroidManifest.xml /ttab line 39 Android AAPT Problem
My friend did this implementing for me previously on other computer, now i have to do this alone. Please help me:)
I am using ADT
My styles.xml:
<resources>
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
<style name="Theme.AppCompat.Light">
<!-- theme customizations here. -->
</style>
<style name="Theme.AppCompat.Light.DarkActionBar" parent="Theme.AppCompat.Light">
<!-- theme customizations here. -->
</style>
</resources>
In "android-support-v7-appcompat" project:
In other hand, the project that uses “android-support-v7-appcompat”:
If you are using Gradle, then you have a problem with the latest version of the compatibility library.
If you have the following in your build.gradle
file with a '+'
at the end:
dependencies {
compile 'com.android.support:appcompat-v7:+'
}
then it may be grabbing a later version of the library than you want.
Changing the dependency to:
dependencies {
compile 'com.android.support:appcompat-v7:18.0+'
}
may fix your problem.
Could you please try
android:theme="Theme.AppCompat.Light.DarkActionBar"
instead of
android:theme="@style/Theme.AppCompat.Light.DarkActionBar"
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