Nat*_*han 4 dependencies compiler-errors gradle android-studio
我已经环顾四周几个小时了,但找不到任何适合我的情况的解释。
每次构建项目时,我都会遇到同样的错误:
Duplicate class com.google.common.util.concurrent.ListenableFuture found in modules jetified-guava-20.0 (com.google.guava:guava:20.0) and jetified-listenablefuture-1.0 (com.google.guava:listenablefuture:1.0)
Go to the documentation to learn how to Fix dependency resolution errors.
Run Code Online (Sandbox Code Playgroud)
但我完全不知道哪些依赖项导致了这种情况。
dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
def dynamicanimation_version = '1.0.0'
implementation "androidx.dynamicanimation:dynamicanimation:$dynamicanimation_version"
implementation 'com.plattysoft.leonids:LeonidsLib:1.3.2'
implementation 'com.ajts.androidmads.sqliteimpex:library:1.0.0'
implementation 'com.google.android.gms:play-services-ads:19.7.0'
implementation 'com.google.android.gms:play-services-auth:19.0.0'
implementation 'com.github.bumptech.glide:glide:4.12.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
implementation 'com.google.http-client:google-http-client-gson:1.26.0'
implementation('com.google.apis:google-api-services-drive:v3-rev136-1.25.0')
{
exclude group: 'org.apache.httpcomponents'
}
}
Run Code Online (Sandbox Code Playgroud)
我在搜索所有课程时都可以看到它们:
但我仍然不知道问题来自哪里。
我对此还比较陌生,所以我可能错过了一些信息。我可以提供您可能需要的任何其他代码或错误信息。
任何意见表示赞赏,谢谢!
我自己找到了这个问题的答案。事实证明这与某些 firebase 实现有关。
Google 创建了一个包来解决此冲突,只需将其添加到您的应用程序级别即可build.gradle;
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5534 次 |
| 最近记录: |