在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中添加邮箱和持卡人姓名?


当前回答

This works for me

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"
    }
}

其他回答

只需进入文件构建。gradle(项目:yourProjectName)。

改变

plugins {
  ...

  id 'org.jetbrains.kotlin.android' version '1.5.x' apply false

  ...
}

(1.5。X表示在您的情况下的X版本号,例如1.5.1。)

To

plugins {
  ...

  id 'org.jetbrains.kotlin.android' version '1.7.10' apply false

  ...
}

这对我来说是有效的……

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

我将android studio版本升级到最新版本,解决了这个问题

我在IntelliJ IDEA的Maven项目中遇到过这个错误。 解决方案是关闭IntelliJ IDEA中的Kotlin插件,如果你的项目中没有使用Kotlin。

至:

菜单文件→设置→插件

点击复选框关闭Kotlin插件。在这里看到的:

这里的大多数答案似乎都围绕着使用Gradle的项目。

我在IntelliJ IDEA中偶然遇到了这个问题,即5分钟前正在编译和运行Maven项目-没有配置更改。我引入了一个新的异常类,然后出现了这个问题。

我尝试了无效缓存和重新启动,这并没有解决问题-但是,禁用和重新启用Kotlin插件解决了问题。