Android 高版本Credentials Manager 降级使用

37 阅读1分钟

// 配置所有 Kotlin 编译任务
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
    kotlinOptions {
        // 跳过元数据版本检查
        freeCompilerArgs += "-Xskip-metadata-version-check"
    }
}
implementation "androidx.credentials:credentials:1.2.2"
implementation ("androidx.credentials:credentials-play-services-auth:1.2.2"){
    // 排除该库的 Kotlin 元数据依赖
    exclude group: 'org.jetbrains.kotlin', module: 'kotlin-metadata'
}
implementation ("com.google.android.libraries.identity.googleid:googleid:1.0.0"){
    // 排除该库的 Kotlin 元数据依赖
    exclude group: 'org.jetbrains.kotlin', module: 'kotlin-metadata'
}

当前gradle版本 7.3.1

kotlin版本 1.7.20