Reputation: 2721
I am trying to write a Hello World program for android. This is my first experience of Java. Gradle is not running properly, and whenever I try to rerun it, it comes up with 24 error messages:
resource android:style/TextAppearance.Material not found
and then lots of attributes of android:style/TextAppearance.Material which are also not found. I have tried searching online for how to put something in styles.xml to fix this, but can't find anything useful.
Upvotes: 2
Views: 12128
Reputation: 1693
In my case the problem was this:
configurations {
compile.exclude group: 'androidx.annotation', module: 'annotation'
compile.exclude group: 'androidx.core', module: 'core'
}
had to comment this block out and it worked.
Upvotes: 2
Reputation: 1335
Try to change you theme to an Android Support Library's material design theme. Don't forget to include the Support Library as well.
Manifest:
<application android:theme="@style/Theme.AppCompat">
Gradle Build file:
dependencies {
implementation 'com.android.support:appcompat-v7:27.1.0'
}
I would also recommend to you that you read the Styles and Themes documentation. https://developer.android.com/guide/topics/ui/look-and-feel/themes.html
Upvotes: 4