GithubHelp home page GithubHelp logo

跟DataStore有冲突 about ktkit HOT 4 CLOSED

woitaylor avatar woitaylor commented on August 26, 2024
跟DataStore有冲突

from ktkit.

Comments (4)

hi-dhl avatar hi-dhl commented on August 26, 2024

我这里试了一下,编译是通过的,可能是项目依赖库版本的问题,可以尝试以下方案解决

    implementation ('com.hi-dhl:ktkit:$ktkitVersion') {
        exclude group: 'androidx.fragment', module: 'fragment' // 可选
        exclude group: 'androidx.fragment', module: 'fragment-ktx' // 可选
        exclude group: 'androidx.appcompat', module: 'appcompat' // 可选
        exclude group: 'androidx.activity', module: 'activity-ktx' // 可选
        exclude group: 'com.googlecode.libphonenumber', module: 'libphonenumber' // 这个需要加上, google 的依赖库的可能版本过低
    }

对于可选的依赖库,如果项目用到的 androidx 版本过低,需要加上

from ktkit.

hi-dhl avatar hi-dhl commented on August 26, 2024

我这里试了一下,编译是通过的,可能是项目依赖库版本的问题,可以尝试以下方案解决

    implementation ('com.hi-dhl:ktkit:$ktkitVersion') {
        exclude group: 'androidx.fragment', module: 'fragment' // 可选
        exclude group: 'androidx.fragment', module: 'fragment-ktx' // 可选
        exclude group: 'androidx.appcompat', module: 'appcompat' // 可选
        exclude group: 'androidx.activity', module: 'activity-ktx' // 可选
        exclude group: 'com.googlecode.libphonenumber', module: 'libphonenumber' // 这个需要加上, google 的依赖库的可能版本过低
    }

对于可选的依赖库,如果项目用到的 androidx 版本过低,需要加上

@woitaylor

from ktkit.

woitaylor avatar woitaylor commented on August 26, 2024

我后面直接把代码拷贝过来使用,我的依赖基本是最新的。

    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation project(path: ':ijkplayerlib')
    implementation project(path: ':statelayout-library')
    implementation project(path: ':imageviewer')
    def lifecycle_version = "2.4.0-beta01"
    def room_version = "2.3.0"
    def nav_version = "2.4.0-alpha06"
    def hilt_version = "2.38.1"
    def paging_version = "3.0.1"

    implementation "androidx.paging:paging-runtime-ktx:$paging_version"
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    // Hilt
    implementation "com.google.dagger:hilt-android:$hilt_version"
    kapt "com.google.dagger:hilt-compiler:$hilt_version"
    // androidx core
    implementation 'androidx.core:core-ktx:1.6.0'
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'com.google.android.material:material:1.4.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation "androidx.fragment:fragment-ktx:1.3.6"

    // lifecycle component
    implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
    implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
    implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
    // Saved state module for ViewModel
    implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:$lifecycle_version"

    // coroutine(协程)
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2"
    // 图片加载库 coil
    implementation("io.coil-kt:coil:1.2.0")
    implementation 'com.github.bumptech.glide:glide:4.12.0'
    // recyclerview
    implementation "androidx.recyclerview:recyclerview:1.2.1"
    // 基础依赖包,必须要依赖 android 4.4以上沉浸式实现
    implementation 'com.gyf.immersionbar:immersionbar:3.0.0'

    implementation "androidx.room:room-runtime:$room_version"
    kapt "androidx.room:room-compiler:$room_version"
    implementation 'com.squareup.okhttp3:okhttp:4.9.1'
    // Java language implementation

    // Kotlin navigation
    implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
    implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
    // XPopup
    implementation 'com.github.li-xiaojun:XPopup:2.5.8'
    // DslTablayout
    implementation 'com.github.angcyo.DslTablayout:TabLayout:2.0.3'

    // RxHttp
    implementation 'com.github.liujingxing.rxhttp:rxhttp:2.6.8'
    implementation 'com.squareup.okhttp3:okhttp:4.9.1'
    kapt 'com.github.liujingxing.rxhttp:rxhttp-compiler:2.6.8' //Use the annotationProcessor instead of kapt, if you use Java

    implementation 'com.scwang.smart:refresh-layout-kernel:2.0.3'      //核心必须依赖
    implementation 'com.scwang.smart:refresh-header-classics:2.0.3'    //经典刷新头
    implementation 'com.scwang.smart:refresh-footer-classics:2.0.3'    //经典加载
    implementation  'com.scwang.smart:refresh-header-material:2.0.3'    //谷歌刷新头

//    implementation 'com.github.iielse:imageviewer:2.1.2'
    implementation 'com.blankj:utilcodex:1.30.6'
    // 图片加载glide
    implementation 'com.github.bumptech.glide:glide:4.12.0'
    implementation('io.github.lucksiege:pictureselector:v2.7.3-rc07') {
        exclude group: 'com.davemorrissey.labs', module: 'subsampling-scale-image-view'
    }
    // colorPicker
    implementation "com.github.skydoves:colorpickerpreference:2.0.5"
    // qiniu
    implementation 'com.qiniu:qiniu-android-sdk:8.3.0'
    // BaseRecyclerViewAdapter
    implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4'
    //DataStore
    implementation "androidx.datastore:datastore:1.0.0"
    implementation "androidx.datastore:datastore-preferences:1.0.0"
    implementation  "com.google.protobuf:protobuf-javalite:3.14.0"

    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

from ktkit.

hi-dhl avatar hi-dhl commented on August 26, 2024

我后面直接把代码拷贝过来使用,我的依赖基本是最新的。

    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation project(path: ':ijkplayerlib')
    implementation project(path: ':statelayout-library')
    implementation project(path: ':imageviewer')
    def lifecycle_version = "2.4.0-beta01"
    def room_version = "2.3.0"
    def nav_version = "2.4.0-alpha06"
    def hilt_version = "2.38.1"
    def paging_version = "3.0.1"

    implementation "androidx.paging:paging-runtime-ktx:$paging_version"
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    // Hilt
    implementation "com.google.dagger:hilt-android:$hilt_version"
    kapt "com.google.dagger:hilt-compiler:$hilt_version"
    // androidx core
    implementation 'androidx.core:core-ktx:1.6.0'
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'com.google.android.material:material:1.4.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation "androidx.fragment:fragment-ktx:1.3.6"

    // lifecycle component
    implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
    implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
    implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
    // Saved state module for ViewModel
    implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:$lifecycle_version"

    // coroutine(协程)
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2"
    // 图片加载库 coil
    implementation("io.coil-kt:coil:1.2.0")
    implementation 'com.github.bumptech.glide:glide:4.12.0'
    // recyclerview
    implementation "androidx.recyclerview:recyclerview:1.2.1"
    // 基础依赖包,必须要依赖 android 4.4以上沉浸式实现
    implementation 'com.gyf.immersionbar:immersionbar:3.0.0'

    implementation "androidx.room:room-runtime:$room_version"
    kapt "androidx.room:room-compiler:$room_version"
    implementation 'com.squareup.okhttp3:okhttp:4.9.1'
    // Java language implementation

    // Kotlin navigation
    implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
    implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
    // XPopup
    implementation 'com.github.li-xiaojun:XPopup:2.5.8'
    // DslTablayout
    implementation 'com.github.angcyo.DslTablayout:TabLayout:2.0.3'

    // RxHttp
    implementation 'com.github.liujingxing.rxhttp:rxhttp:2.6.8'
    implementation 'com.squareup.okhttp3:okhttp:4.9.1'
    kapt 'com.github.liujingxing.rxhttp:rxhttp-compiler:2.6.8' //Use the annotationProcessor instead of kapt, if you use Java

    implementation 'com.scwang.smart:refresh-layout-kernel:2.0.3'      //核心必须依赖
    implementation 'com.scwang.smart:refresh-header-classics:2.0.3'    //经典刷新头
    implementation 'com.scwang.smart:refresh-footer-classics:2.0.3'    //经典加载
    implementation  'com.scwang.smart:refresh-header-material:2.0.3'    //谷歌刷新头

//    implementation 'com.github.iielse:imageviewer:2.1.2'
    implementation 'com.blankj:utilcodex:1.30.6'
    // 图片加载glide
    implementation 'com.github.bumptech.glide:glide:4.12.0'
    implementation('io.github.lucksiege:pictureselector:v2.7.3-rc07') {
        exclude group: 'com.davemorrissey.labs', module: 'subsampling-scale-image-view'
    }
    // colorPicker
    implementation "com.github.skydoves:colorpickerpreference:2.0.5"
    // qiniu
    implementation 'com.qiniu:qiniu-android-sdk:8.3.0'
    // BaseRecyclerViewAdapter
    implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4'
    //DataStore
    implementation "androidx.datastore:datastore:1.0.0"
    implementation "androidx.datastore:datastore-preferences:1.0.0"
    implementation  "com.google.protobuf:protobuf-javalite:3.14.0"

    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

先添加以下过滤吧,相同的依赖使用当前项目最新

    implementation ('com.hi-dhl:ktkit:$ktkitVersion') {
        exclude group: 'androidx.fragment', module: 'fragment' // 可选
        exclude group: 'androidx.fragment', module: 'fragment-ktx' // 可选
        exclude group: 'androidx.appcompat', module: 'appcompat' // 可选
        exclude group: 'androidx.activity', module: 'activity-ktx' // 可选
        exclude group: 'com.googlecode.libphonenumber', module: 'libphonenumber' // 这个需要加上, google 的依赖库的可能版本过低
    }

from ktkit.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.