我只是从Android Studio创建一个项目,gradle文件如下所示,
问题是,appcompat和recyclerview应该是同一版本,我猜过,我尝试了很多事情,但是找不到相同版本。
如何解决此问题?
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.core:core-ktx:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
答案 0 :(得分:0)
使用androidx release(而不是支持库版本)。
您可以使用:
androidx.recyclerview:recyclerview:1.1.0-beta03
或
androidx.recyclerview:recyclerview:1.0.0
代替
implementation 'com.android.support:recyclerview-v7:28.0.0'