dint-dev / cryptography

Cryptography for Flutter developers: encryption, digital signatures, key agreement, etc.
https://pub.dev/packages/cryptography
Apache License 2.0
155 stars 75 forks source link

flutter : Android build failed #180

Closed jibinjayachandran closed 2 months ago

jibinjayachandran commented 2 months ago

Hello there , I am not able to build apk and I am getting error like cryptography_flutter_debug.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0.

package version are as follows.

 cryptography: ^2.7.0
  cryptography_flutter: ^2.3.2

How do I resolve this ?

jibinjayachandran commented 2 months ago

resolved by changing kotlin version and gradle version as follows.

ext.kotlin_version = '1.9.22'

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