gpt4 book ai didi

android.support.design.widget.CoordinatorLayout 错误

转载 作者:行者123 更新时间:2023-12-04 23:46:13 34 4
gpt4 key购买 nike

我该如何修复这条红线? android.support.design.widget.CoordinatorLayout 错误 我是否错过了依赖项中的某些内容?

enter image description here

enter image description here

this is my dependencies 

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
}

最佳答案

您需要使用 androidx 零件

利用

<androidx.coordinatorlayout.widget.CoordinatorLayout

代替
<android.support.design.widget.CoordinatorLayout

利用
<androidx.recyclerview.widget.RecyclerView

代替
<android.support.v7.widget.RecyclerView

利用
<com.google.android.material.appbar.AppBarLayout
<androidx.appcompat.widget.Toolbar

代替
<android.support.design.widget.AppBarLayout
<android.support.v7.widget.Toolbar

对于 FloatingActionButton利用
<com.google.android.material.floatingactionbutton.FloatingActionButton

关于android.support.design.widget.CoordinatorLayout 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62424812/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com