androidx和v4包资源冲突解决方法

这篇具有很好参考价值的文章主要介绍了androidx和v4包资源冲突解决方法。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

一、资源包会报如下错误:

错误类似 (androidx.core:core:1.10.0) 和 (com.android.support:support-compat:24.2.0)

表示资源重复,不知调用androidx包下面的,还是v4包下面的

Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.10.0-runtime (androidx.core:core:1.10.0) and support-compat-24.2.0-runtime (com.android.support:support-compat:24.2.0)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules core-1.10.0-runtime (androidx.core:core:1.10.0) and support-compat-24.2.0-runtime (com.android.support:support-compat:24.2.0)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules core-1.10.0-runtime (androidx.core:core:1.10.0) and support-compat-24.2.0-runtime (com.android.support:support-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$CallbackHandler found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$ConnectionCallback found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$ConnectionCallback$ConnectionCallbackInternal found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$ItemCallback found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$ItemReceiver found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImpl found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi21 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi21$1 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi21$2 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi21$3 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi23 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$1 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$2 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$3 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$MediaServiceConnection found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$MediaServiceConnection$1 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$MediaServiceConnection$2 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserServiceCallbackImpl found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaItem found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaItem$1 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$ServiceBinderWrapper found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$Subscription found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$SubscriptionCallback found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaDescriptionCompat found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaDescriptionCompat$1 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaDescriptionCompat$Builder found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaMetadataCompat found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaMetadataCompat$1 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.MediaMetadataCompat$Builder found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.RatingCompat found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.RatingCompat$1 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.RatingCompat$StarStyle found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.RatingCompat$Style found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.IMediaControllerCallback found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.IMediaControllerCallback$Stub found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.IMediaControllerCallback$Stub$Proxy found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.IMediaSession found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.IMediaSession$Stub found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.IMediaSession$Stub$Proxy found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaControllerCompat found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaControllerCompat$Callback found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaControllerCompat$Callback$MessageHandler found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaControllerCompat$Callback$StubCompat found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaControllerCompat$MediaControllerImpl found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaControllerCompat$MediaControllerImplApi21 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaControllerCompat$MediaControllerImplBase found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaControllerCompat$PlaybackInfo found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaControllerCompat$TransportControls found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaControllerCompat$TransportControlsApi21 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaControllerCompat$TransportControlsBase found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaSessionCompat found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaSessionCompat$1 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaSessionCompat$Callback found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaSessionCompat$MediaSessionImpl found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaSessionCompat$MediaSessionImplApi21 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaSessionCompat$MediaSessionImplBase found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaSessionCompat$MediaSessionImplBase$1 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaSessionCompat$MediaSessionImplBase$Command found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaSessionCompat$MediaSessionImplBase$MediaSessionStub found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaSessionCompat$MediaSessionImplBase$MessageHandler found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaSessionCompat$OnActiveChangeListener found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaSessionCompat$QueueItem found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaSessionCompat$QueueItem$1 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaSessionCompat$ResultReceiverWrapper found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaSessionCompat$ResultReceiverWrapper$1 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaSessionCompat$Token found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.MediaSessionCompat$Token$1 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.ParcelableVolumeInfo found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.ParcelableVolumeInfo$1 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.PlaybackStateCompat found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.PlaybackStateCompat$1 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.PlaybackStateCompat$Actions found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.PlaybackStateCompat$Builder found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.PlaybackStateCompat$CustomAction found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.PlaybackStateCompat$CustomAction$1 found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.PlaybackStateCompat$CustomAction$Builder found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.PlaybackStateCompat$MediaKeyAction found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.media.session.PlaybackStateCompat$State found in modules media-1.2.1-runtime (androidx.media:media:1.2.1) and support-media-compat-24.2.0-runtime (com.android.support:support-media-compat:24.2.0)
Duplicate class android.support.v4.os.IResultReceiver found in modules core-1.10.0-runtime (androidx.core:core:1.10.0) and support-compat-24.2.0-runtime (com.android.support:support-compat:24.2.0)
Duplicate class android.support.v4.os.IResultReceiver$Stub found in modules core-1.10.0-runtime (androidx.core:core:1.10.0) and support-compat-24.2.0-runtime (com.android.support:support-compat:24.2.0)
Duplicate class android.support.v4.os.IResultReceiver$Stub$Proxy found in modules core-1.10.0-runtime (androidx.core:core:1.10.0) and support-compat-24.2.0-runtime (com.android.support:support-compat:24.2.0)
Duplicate class android.support.v4.os.ResultReceiver found in modules core-1.10.0-runtime (androidx.core:core:1.10.0) and support-compat-24.2.0-runtime (com.android.support:support-compat:24.2.0)
Duplicate class android.support.v4.os.ResultReceiver$1 found in modules core-1.10.0-runtime (androidx.core:core:1.10.0) and support-compat-24.2.0-runtime (com.android.support:support-compat:24.2.0)
Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules core-1.10.0-runtime (androidx.core:core:1.10.0) and support-compat-24.2.0-runtime (com.android.support:support-compat:24.2.0)
Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules core-1.10.0-runtime (androidx.core:core:1.10.0) and support-compat-24.2.0-runtime (com.android.support:support-compat:24.2.0)

二、 解决方法

2.1 在gradle.properties中只添加了android.useAndroidX=true(表示当前项目启用 AndroidX)

2.2 添加android.enableJetifier=true(表示将依赖包也迁移到AndroidX,将项目中用到的第三方库中的support引用转为androidx引用) 即可

android.useAndroidX=true
android.enableJetifier=true

duplicate class android.support.v4.app.inotificationsidechannel found in mod,androidx,Android文章来源地址https://www.toymoban.com/news/detail-787600.html

到了这里,关于androidx和v4包资源冲突解决方法的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

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

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

相关文章

  • Android之解决RecyclerView与NestedScrollView的滑动冲突方法

    问题一:当我们滑动RecyclerView组件时,上方的轮播图并没有进行滑动(NestedScrollView没有滑动,即滑动事件被RecyclerView消费了), 当RecyclerView滑到底时,轮播图部分才进行滑动 。 如下图,RecyclerView已经进行了滑动,但轮播图部分没有。 整体布局 这并不符合我们的设计要求,

    2024年02月16日
    浏览(48)
  • android studio非业务代码报错 Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules。

    使用的android studio(2020.3.1)android的原生项目,项目突然启动不起来,一直报错,下面是错误信息。 解决方法: 在项目的build.gradle文件,dependencies下面添加这句代码就好了

    2024年02月05日
    浏览(39)
  • Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules。Android studio纯java代码报错

    我使用java代码 构建项目,初始代码运行就会报错。我使用的是Android Studio Giraffe(Adroid-studio-2022.3.1.18-windows)。我在网上找的解决办法是删除重复的类,但这操作起来真的太麻烦了。  这是全部报错代码: 最后在堆栈上找到了简单的方法,在Gradle Scripts里的build.gradle.kts添加上

    2024年02月11日
    浏览(41)
  • Didn‘t find class “androidx.core.app.CoreComponentFactory“核心库中类加载失败

    开发过程中遇到一个问题,是Bugly上报的崩溃,应用首次安装第一次打开时出现崩溃,日志大致信息报错如下: 分析报错日志,我们可以看到是核心库加载失败,由BaseDexClassLoader抛出异常,这里我贴出BaseDexClassLoader#findClass(String name)方法的源码,感兴趣的可以看看。 引起该错误

    2024年02月16日
    浏览(34)
  • 报错Duplicate entry ‘值‘ for key ‘字段名‘的解决解决方法

    遇到这种问题, 是你的数据库表那个字段设置了唯一索引。所以这个字段新增的数据不能重复。具体可以打开表,然后点击表设置,具体教程可以看下文章最后 Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry \\\'测试\\\' for key \\\'teacher.uk_name\\\'     at

    2023年04月13日
    浏览(55)
  • AD关于原理图编译出现Duplicate Net Names Wire的可能解决方法之一

                         关于Duplicate Net Names Wire网络名重复错误的解决方法有很多,我自己在遇到这个问题的时候,也尝试了许多方法,如更改网络识别符的范围为global,我报错的CPU_OK1的重复命名报错是解决了,可是又会出现更多的其他类型错误;还有的方法是直接忽略

    2024年02月11日
    浏览(40)
  • Android 解决第三方库版本冲突

    在开发游戏SDK时会使用一些第三方库,例如上文提到的 OkHttp ,或者集成某些第三方,而这些第三方使用的系统库(例如 supportv7)和项目组使用的版本不一致,在编译时就会出现版本冲突问题。解决办法有两个: 尽量不使用第三库,例如针对 OkHttp ,如果没有特殊的需求(比

    2023年04月27日
    浏览(111)
  • MybatisPlus 使用 saveOrUpdate 详解(慎用),及问题解决方法&mysql保存或更新 ON DUPLICATE KEY UPDATE

    今天的想法是,要在插入数据库时,如果有某某一个主要字段的值重复,则不插入,否则则插入! 看了一下mybatis-Plus是有这个saveOrUpdate 方法! 原本使用save时是没有问题了,改成saveOrUpdate 用了一下就报错了。 com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: error: can not execut

    2024年02月11日
    浏览(38)
  • 【干货】Android系统定制基础篇:第六部分-Android扩展服务-AndroidX

    AndroidX 做为一个后台 Service 应用,开机自动运行,配合系统做一些定制化功能,并且对外提供 API。 主要功能: ● 硬件看门狗代理 ● USB Host/Device 切换 ● 4G 网络保活 ● 系统日志写入文件 ● 键值拦截 ● 启用应用 项目地址:https://github.com/aystshen/AndroidX 硬件看门狗代理主要

    2024年02月09日
    浏览(53)
  • Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry ‘xxx‘ for key ‘xxx‘错误的解决方法

    今天写好 导入hive表 的接口,如下代码所示: 启动 postman 访问该接口,确报出如下错误: 错误信息比较多,我们就截取如上重要的信息: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry \\\'missionMockId-x01\\\' for key \\\'idx_misstion_id_deleted\\\' 。 根据 java.sql.SQLIntegrityConstraintViolationExce

    2024年02月09日
    浏览(42)

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

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

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

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

二维码1

领取红包

二维码2

领红包