java– 尝试生成apk时,android studio中的livesata $1.class重复输入错误

java– 尝试生成apk时,android studio中的livesata .class重复输入错误,第1张

概述我真的不知道造成这个错误的原因以及如何解决它我的所有依赖:implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:27.1.0' implementation 'com.android.support.c

我真的不知道造成这个错误的原因以及如何解决它

我的所有依赖:

implementation filetree(dir: 'libs',include: ['*.jar'])implementation 'com.androID.support:appcompat-v7:27.1.0'implementation 'com.androID.support.constraint:constraint-layout:1.0.2'implementation 'com.Google.firebase:firebase-auth:11.8.0'implementation 'com.Google.firebase:firebase-firestore:11.8.0'implementation 'com.firebaseui:firebase-ui-firestore:3.2.1'implementation 'com.Google.firebase:firebase-crash:11.8.0'implementation 'com.Google.firebase:firebase-storage:11.8.0'implementation ('com.facebook.androID:facebook-android-sdk:4.31.0'){exclude group: 'com.androID.support'}implementation'com.github.bumptech.glIDe:glIDe:4.6.1'annotationProcessor 'com.github.bumptech.glIDe:compiler:4.6.1'compile 'com.androID.support:cardvIEw-v7:27.1.0'compile 'com.androID.support:recyclervIEw-v7:27.1.0'compile 'com.airbnb.androID:lottIE:2.3.0'compile 'com.squareup.picasso:picasso:2.5.2'compile 'com.theartofdev.edmodo:androID-image-cropper:2.6.0'compile 'de.hdodenhof:circleimagevIEw:2.2.0'implementation 'com.androID.support:design:27.1.0'compile 'com.androID.support:multIDex:1.0.3'

一切都很好,但更新到27.1.0后

它会在生成apk时导致错误

错误:任务’:app:transformClassesWithJarMergingForRelease’的执行失败.

com.androID.build.API.transform.transformException: java.util.zip.ZipException: duplicate entry: androID/arch/lifecycle/liveData$1.class

最佳答案这可能是由于依赖项的版本不匹配而发生的.
我检查了它的依赖树:

androID.arch.lifecycle:extensions:1.0.0

androID.arch.lifecycle:livedata-core:1.1.0

看到不匹配1.0.0& 1.1.0

在您的情况下尝试更新:

implementation 'com.firebaseui:firebase-ui-firestore:3.2.1'

至:

implementation 'com.firebaseui:firebase-ui-firestore:3.2.2'

应该有希望修复版本问题.

并注意,对于所有依赖项,不推荐使用compile实现.

Update:

您始终可以通过windows中的命令gradlew your_app_name:dependencIEs检查依赖关系树 总结

以上是内存溢出为你收集整理的java – 尝试生成apk时,android studio中的livesata $1.class重复输入错误全部内容,希望文章能够帮你解决java – 尝试生成apk时,android studio中的livesata $1.class重复输入错误所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/web/1139576.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-31
下一篇2022-05-31

发表评论

登录后才能评论

评论列表(0条)

    保存