Lyft Android SDK 集成问题

阿尼尔

我在我的应用程序中 build.gradle 文件的依赖项部分添加了 Lyft android SDK 依赖项,如下所示

implementation "com.lyft:lyft-android-sdk:1.0.3

但是我在移动设备上运行应用程序时遇到以下错误:-

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDevDebug'.
com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org

BUILD FAILED in 3m 33s

我尝试通过app gradle 的默认配置添加multiDexEnabled true来解决上述问题,但它不起作用。

我使用的是 Android Studio 3.0.1 和 gradle 4.1 版本。

阿尼尔

我通过在 gradle 构建过程中启用堆栈跟踪并查看堆栈跟踪日志来调查更多问题。

在堆栈跟踪中,我发现 org.jetbrains.annotations 包中有一个重复的类,它来自两个不同的依赖模块。一个依赖模块来自 kotlin 依赖,一个来自 lyft sdk 依赖模块。所以我在 build.gradle 中添加了 Lyft sdk 依赖项,如下所示,它对我有用。

implementation ("com.lyft:lyft-android-sdk:1.0.3"){
        exclude group: 'org.jetbrains', module:'annotations-java5'
    }

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章