android 9.0以后咏删,谷歌建議使用這個(gè)庫(kù)惹想,替換過程中,與原有的庫(kù)出現(xiàn)錯(cuò)誤如下
Duplicate class android.support.v4.app.INotificationSideChannel found in modules classes.jar (androidx.core:core:1.1.0-beta01) and classes.jar (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules classes.jar (androidx.core:core:1.1.0-beta01) and classes.jar (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules classes.jar (androidx.core:core:1.1.0-beta01) and classes.jar (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.IResultReceiver found in modules classes.jar (androidx.core:core:1.1.0-beta01) and classes.jar (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.IResultReceiver$Stub found in modules classes.jar (androidx.core:core:1.1.0-beta01) and classes.jar (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.IResultReceiver$Stub$Proxy found in modules classes.jar (androidx.core:core:1.1.0-beta01) and classes.jar (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.ResultReceiver found in modules classes.jar (androidx.core:core:1.1.0-beta01) and classes.jar (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.ResultReceiver$1 found in modules classes.jar (androidx.core:core:1.1.0-beta01) and classes.jar (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules classes.jar (androidx.core:core:1.1.0-beta01) and classes.jar (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules classes.jar (androidx.core:core:1.1.0-beta01) and classes.jar (com.android.support:support-compat:27.1.1)
Go to the documentation to learn how to Fix dependency resolution errors.
需要顯示指定有限使用androidx督函,在 gradle.properties 里面進(jìn)行配置如下
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
gradle.properties
androidx對(duì)原有的一些組件修改嘀粱,還是不夠完善激挪,有bug,謹(jǐn)慎替換7孢丁B⒎帧!
androidx使用交流郵箱 liugstick@163.com 娃磺,歡迎騷擾1∈!偷卧!