error: failed linking references. -> QueuedJob

前端 未结 5 1787
时光说笑
时光说笑 2021-01-17 13:04

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.

相关标签:
5条回答
  • 2021-01-17 13:45

    Remove this line from dependencies in gradle build file:

    implementation 'com.android.support.constraint:constraint-layout:+'
    
    0 讨论(0)
  • 2021-01-17 13:49

    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.

    0 讨论(0)
  • 2021-01-17 13:52

    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.

    0 讨论(0)
  • 2021-01-17 13:57

    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.

    0 讨论(0)
  • 2021-01-17 13:59

    For my situation, my compileSdkVersion < targetSdkVersion in build.gradle. Just change compileSdkVersion >= targetSdkVersion.

    0 讨论(0)
提交回复
热议问题