Gradle cannot resolve AppCompat themes

I imported the appcompat library via:

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 is displayed in external libraries. However, I cannot create the application because when I try, there is an error in my .xml styles:

Error:Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'

Here I declare a theme coming from an AppCompat theme, for example:

  <style name="TextStyleSuperClass" parent="@style/Theme.AppCompat.Light">
  </style>

Do you know how to fix this?

+4
source share
2 answers

On this site Get ActionBar Support Library working with Android Studio . I found the following line and added it to activity in AndroidManifest.xml:

android:theme="@style/Theme.AppCompat.Light"

From what Android Studio managed to solve Theme.AppCompat

+1
source

@style. :

Android: = "ThemeOverlay.AppCompat.Dark.ActionBar"

25 SDK

0

Source: https://habr.com/ru/post/1544663/


All Articles