Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kotlin1.7.1版本提示 #19

Closed
luobanghong opened this issue Jul 21, 2023 · 2 comments
Closed

kotlin1.7.1版本提示 #19

luobanghong opened this issue Jul 21, 2023 · 2 comments

Comments

@luobanghong
Copy link

依赖库,io.github.anylifezlb:FaceRecognition:1.0.0

Android studio 4.1.1 gradle是6.5,同步不下来1.7的kotlin版本,项目中只有1.4相关版本。
1:1识别的demo,移植到项目中,提示以下错误
Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.4.1.

@AnyLifeZLB
Copy link
Owner

可以升级Kotlin 和相关依赖 ,如果项目中有强制要求某个版本kotlin,可以在Root gradle 中配置

ext {
    kotlin_version = "1.7.20"
    java_version = JavaVersion.VERSION_1_8
}


//如果和你的项目中Kotlin 依赖不一致。 强制统一项目中的Kotlin 版本依赖
ConfigurationContainer container = project.configurations
container.all { Configuration conf ->
    ResolutionStrategy rs = conf.resolutionStrategy
    rs.eachDependency { details ->
        def requested = details.requested
        if (requested.group == "org.jetbrains.kotlin") {
            //统一内部 kotlin 库的版本
            details.useVersion("$kotlin_version")
        }
    }
}

@AnyLifeZLB
Copy link
Owner

AnyLifeZLB commented Aug 4, 2023

@luobanghong 在本Demo 中验证 了

// 人脸识别 活体检测 SDK 依赖
implementation 'io.github.anylifezlb:FaceRecognition:1.0.9'

implementation 'io.github.lucksiege:pictureselector:v3.11.1' //升级到新依赖,没有冲突,看看能否升级

可以解决冲突无问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants