dependencies { implementation ("com.baidu.aip:java-sdk:4.16.16") { exclude group: 'com.google.guava', module: 'listenablefuture' } implementation 'androidx.core:core-ktx:1.10.0' implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'com.google.android.material:material:1.8.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.1' implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1' implementation 'androidx.navigation:navigation-fragment-ktx:2.4.1' implementation 'androidx.navigation:navigation-ui-ktx:2.5.2' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' implementation 'com.yanzhenjie:permission:2.0.2' //room implementation ("androidx.room:room-runtime:2.5.0") { exclude group: 'com.google.guava', module: 'listenablefuture' } implementation "androidx.room:room-ktx:2.5.0" kapt 'androidx.room:room-compiler:2.5.0' implementation 'com.makeramen:roundedimageview:2.3.0' } Duplicate class com.google.common.util.concurrent.ListenableFuture found in modules guava-23.0 (com.google.guava:guava:23.0) and listenablefuture-1.0 (com.google.guava:listenablefuture:1.0) Go to the documentation to learn how to Fix dependency resolution errors.
时间: 2024-03-11 11:44:37 浏览: 186
Could not resolve dependencies for project org.apache.hive:hive-exec:jar:2.3.0:
5星 · 资源好评率100%
你已经成功解决了冲突!现在你的 Gradle 文件中排除了两个库中的一个,即com.google.guava:listenablefuture,这个库的版本为23.0。这个库与另一个库com.google.guava:guava中的同名类冲突。
现在你应该可以正常构建你的项目了。如果你在构建过程中遇到了其他问题,请随时向我提问。
阅读全文