I was studying the Android Material Design using Kotlin and everything was going fine until I tried to use the android.support.design.widget.FloatingActionButton.
Remove this line from dependencies
in gradle build file:
implementation 'com.android.support.constraint:constraint-layout:+'
Go to build.gradle(app)
and add this in dependency:
implementation 'com.android.support:appcompat-v7:28.0.0'
Right now my compileSdkVersion
is 28
, so it is 28.0.0
.
Try and change according to that.
I've just deleted my color resourse, but it have been used in my style. So, check if your colors are really not using anywhere by Ctrl+Shift+F
.
You were referencing an attribute "textColor", when it should be "android:textColor".
In app/src/main/res/values/styles.xml replace in line 13 and line 17:
<item name="textColor">...</item> -> <item name="android:textColor">...</item>
The how: the error from AAPT stated the following:
error: style attribute 'attr/textColor (aka br.com.conseng.themedesign:attr/textColor)' not found.
It points out that you (or your libraries) are using an attribute somewhere that is not recognized. I searched for "textColor" in your repository and came up with the two attributes with the name "textColor". The widely used attribute is "android:textColor" and you didn't define the attribute "textColor" anywhere yourself, so it looked like you were missing the "android:" prefix.
For my situation, my compileSdkVersion < targetSdkVersion in build.gradle. Just change compileSdkVersion >= targetSdkVersion.