相关疑难解决方法(0)

颤振和android gradle错误:任务':app:checkDebugDuplicateClasses'的执行失败

我已经在我的项目中实现了 flutterDownloader(它是一个用于在 flutter 中下载文件的包),当我像文档所说的那样将它添加到 android manifest 时,当我这样做时,gradle 会显示这个错误

**错误 : **


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> 1 exception was raised by workers:
  java.lang.RuntimeException: Duplicate class com.google.common.util.concurrent.ListenableFuture found in modules guava-26.0-android.jar (com.google.guava:guava:26.0-android) and listenablefuture-1.0.jar (com.google.guava:listenablefuture:1.0)

  Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. …
Run Code Online (Sandbox Code Playgroud)

android flutter

5
推荐指数
2
解决办法
2819
查看次数

在模块guava-20.0.jar(com.google.guava:guava:20.0)中找到的重复类com.google.common.util.concurrent.ListenableFuture

在我的中使用implementation 'com.google.firebase:firebase-inappmessaging-display:17.2.0'app/build.gradle,出现以下错误:

Duplicate class com.google.common.util.concurrent.ListenableFuture found in modules guava-20.0.jar (com.google.guava:guava:20.0) and listenablefuture-1.0.jar (com.google.guava:listenablefuture:1.0)

Go to the documentation to learn how to Fix dependency resolution errors.
Run Code Online (Sandbox Code Playgroud)

我的内在app/build.gradle是:

implementation 'com.google.android.gms:play-services-base:16.1.0'
implementation 'com.google.android.gms:play-services-analytics:16.0.8'
implementation 'com.google.android.gms:play-services-awareness:16.0.0'
implementation 'com.google.android.gms:play-services-cast:16.2.0'
implementation 'com.google.android.gms:play-services-gcm:16.1.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.google.firebase:firebase-iid:17.1.2'
implementation 'com.google.firebase:firebase-messaging:17.6.0'
implementation 'android.arch.work:work-runtime:1.0.1'
implementation 'com.android.support:multidex:1.0.3'
apply plugin: 'com.google.gms.google-services'
Run Code Online (Sandbox Code Playgroud)

也许我正在使用的库之一已经包含对In-App Messaging依赖的支持,然后它变得多余了?谢谢。

android guava firebase firebase-in-app-messaging

3
推荐指数
8
解决办法
1350
查看次数