0

enter image description here

In project build.gradle:

buildscript = ext.kotlin_version = '1.6.10' 

// dependencies 
classpath 'com.android.tools.build:gradle:7.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

In app build.gradle:

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  • Please don't post error logs as images. See [ask] for more info – Sergei Kozelko May 30 '23 at 23:01
  • 2
    Does this answer your question? [flutter build apk - Runtime JAR files in the classpath should have the same version](https://stackoverflow.com/questions/73615631/flutter-build-apk-runtime-jar-files-in-the-classpath-should-have-the-same-vers) – Sergei Kozelko May 30 '23 at 23:05

3 Answers3

0

Try changing

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version

to

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10"
krishnaacharyaa
  • 14,953
  • 4
  • 49
  • 88
0

Try updating classpath gradle version in android/build.gradle classpath("com.android.tools.build:gradle:x.x.x") maybe update a more recent version (3.0.1 > 4.0.1), some times this cause problems. After do this, go to android folder in the console (cd android) and clean chache (./gradlew clean),

TheSaulMX
  • 11
  • 1
0

I found a solution I just edit upgrade my jdk to 8 in android>app>buildGradle>dependencies:

dependencies {  
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"  
}
UN..D
  • 543
  • 5
  • 15