在Stripe中,我的客户需要电子邮件和持卡人的姓名,但Stripe支付UI没有在com.stripe.android.view.CardMultilineWidget中提供该选项。我想试试最新的条纹版,

I was using Stripe version (14.1.1). So I updated it to the latest one (16.8.0) The build showed me the error that it doesn't take minSdkVersion 19. It requires 21 in manifest merger. So I updated minSdkVersion to 21. I got caches/transforms-2/files-2.1/4541b0189187e0017d23bbb0afebd16a/jetified-kotlin-stdlib-common-1.5.0.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.

我尝试改变Gradle版本,但我仍然得到相同的错误。如何解决不兼容的错误,在Stripe中添加邮箱和持卡人姓名?


当前回答

我已经设置了minsdk 24并重新启动Android Studio,其工作正常。

其他回答

更改项目构建gradle为

    buildscript {
    ext.kotlin_version = '1.7.20'
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.2.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

确保你的IDE的Kotlin版本与你在gradle中声明的版本相同。构建文件。

使用Flutter,由以下方法修复:

更新Android Studio包,特别是Kotlin插件。 从Gradle - plugin和versions中获取Kotlin插件的最新版本Nbr。目前是1.6.10。 安卓系统更新< Your_project_name_folder > \ \构建。gradle文件替换旧的Kotlin版本的新一个你从上面的网站。 ext.kotlin_version = '<The_new_version_Nbr>'在我的例子中ext.kotlin_version = '1.6.10' 重新启动Visual Studio代码。

你就完成了。

请检查您的Kotlin版本与compose版本是否兼容。 如果不是,那么请做出更改,它应该工作正常。

编写编译器版本兼容Kotlin编译器版本

1.3.0 --> 1.7.10
1.3.0-rc01 --> 1.7.10
1.3.0-beta01 --> 1.7.10
1.2.0 --> 1.7.0
1.2.0-rc01 --> 1.6.21
1.2.0-beta03 --> 1.6.21
1.2.0-alpha08 --> 1.6.20
1.1.0 --> 1.6.10
1.1.1 --> 1.6.10
1.1.0-rc031.6.10

我在Flutter项目中遇到过这个问题。

在我的例子中,Android版本中缺少kotlin-gradle-plugin的一行。所以添加ext.kotlin_version = '1.6.10'并不能修复它。

后添加

classpath “org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version”

错误消失了。

完整代码部分:

buildscript {
    ext.kotlin_version = '1.6.10'
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}