Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.5.0-runtime

这篇具有很好参考价值的文章主要介绍了Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.5.0-runtime。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

冲突问题

androidx和support类冲突,具体如下:

Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.IResultReceiver found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.IResultReceiver$Stub found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.IResultReceiver$Stub$Proxy found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.ResultReceiver found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.ResultReceiver$1 found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)

Go to the documentation to learn how to Fix dependency resolution errors.

解决办法

在工程中 gradle.properties 中加入配置:android.enableJetifier=true

Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.5.0-runtime,android,android studio,移动开发,androidx冲突

说明

其实在出错的同时也有这么断错误:

AGPBI: {“kind”:“warning”,“text”:“Your project has set android.useAndroidX=true, but configuration :player:debugRuntimeClasspath still contains legacy support libraries, which may cause runtime issues.\nThis behavior will not be allowed in Android Gradle plugin 8.0.\nPlease use only AndroidX dependencies or set android.enableJetifier=true in the gradle.properties file to migrate your project to AndroidX (see https://developer.android.com/jetpack/androidx/migrate for more info).\nThe following legacy support libraries are detected:\n:player:debugRuntimeClasspath -> project :listplayer -> com.github.bumptech.glide:glide:4.9.0 -> com.github.bumptech.glide:gifdecoder:4.9.0 -> com.android.support:support-annotations:27.1.1\n:player:debugRuntimeClasspath -> project :listplayer -> com.github.bumptech.glide:glide:4.9.0 -> com.android.support:support-fragment:27.1.1\n:player:debugRuntimeClasspath -> project :listplayer -> com.github.bumptech.glide:glide:4.9.0 -> com.android.support:support-fragment:27.1.1 -> com.android.support:support-compat:27.1.1\n:player:debugRuntimeClasspath -> project :listplayer -> com.github.bumptech.glide:glide:4.9.0 -> com.android.support:support-fragment:27.1.1 -> com.android.support:support-compat:27.1.1 -> android.arch.lifecycle:runtime:1.1.0\n:player:debugRuntimeClasspath -> project :listplayer -> com.github.bumptech.glide:glide:4.9.0 -> com.android.support:support-fragment:27.1.1 -> android.arch.lifecycle:livedata-core:1.1.0 -> android.arch.lifecycle:common:1.1.0\n:player:debugRuntimeClasspath -> project :listplayer -> com.github.bumptech.glide:glide:4.9.0 -> com.android.support:support-fragment:27.1.1 -> android.arch.lifecycle:livedata-core:1.1.0 -> android.arch.core:common:1.1.0\n:player:debugRuntimeClasspath -> project :listplayer -> com.github.bumptech.glide:glide:4.9.0 -> com.android.support:support-fragment:27.1.1 -> com.android.support:support-core-ui:27.1.1\n:player:debugRuntimeClasspath -> project :listplayer -> com.github.bumptech.glide:glide:4.9.0 -> com.android.support:support-fragment:27.1.1 -> com.android.support:support-core-utils:27.1.1\n:player:debugRuntimeClasspath -> project :listplayer -> com.github.bumptech.glide:glide:4.9.0 -> com.android.support:support-fragment:27.1.1 -> android.arch.lifecycle:livedata-core:1.1.0\n:player:debugRuntimeClasspath -> project :listplayer -> com.github.bumptech.glide:glide:4.9.0 -> com.android.support:support-fragment:27.1.1 -> android.arch.lifecycle:livedata-core:1.1.0 -> android.arch.core:runtime:1.1.0\n:player:debugRuntimeClasspath -> project :listplayer -> com.github.bumptech.glide:glide:4.9.0 -> com.android.support:support-fragment:27.1.1 -> android.arch.lifecycle:viewmodel:1.1.0\n:player:debugRuntimeClasspath -> project :listplayer -> com.github.bumptech.glide:glide:4.9.0 -> com.android.support:animated-vector-drawable:27.1.1\n:player:debugRuntimeClasspath -> project :listplayer -> com.github.bumptech.glide:glide:4.9.0 -> com.android.support:animated-vector-drawable:27.1.1 -> com.android.support:support-vector-drawable:27.1.1”,“sources”:[{}]}

Your project has set android.useAndroidX=true, but configuration :player:debugRuntimeClasspath still contains legacy support libraries, which may cause runtime issues.
This behavior will not be allowed in Android Gradle plugin 8.0.
Please use only AndroidX dependencies or set android.enableJetifier=true in the gradle.properties file to migrate your project to AndroidX (see https://developer.android.com/jetpack/androidx/migrate for more info).
The following legacy support libraries are detected:

工具已经提示我们怎么处理了。工程已经配置了androidx,但又配置了support 的库,运行的时候可能会发生错误。请仅使用androidx的依赖或者在gradle.properties中添加android.enableJetifier=true将support库转换为androidx的依赖。

其次,个人在使用过程中,遇见了1.5 / 1.7的冲突,只有INotificationSideChannel和os.ResultReceiver两个类冲突。若不是可以配置android.enableJetifier=true将其转换,各种依赖查询,各种exclude要死人的。文章来源地址https://www.toymoban.com/news/detail-618744.html

到了这里,关于Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.5.0-runtime的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包