ERROR: Some runtime JAR files in the classpath have an incompatible version. Consider removing them from the classpath

1,104 views
Skip to first unread message

Kristin

unread,
Oct 20, 2021, 12:26:11 PM10/20/21
to Flutter Development (flutter-dev)
When running flutter build apk I get the following error:
w: Runtime JAR files in the classpath should have the same version. These files were found in the classpath:
    C:/Users/username/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.3.50/50ad05ea1c2595fb31b800e76db464d08d599af3/kotlin-stdlib-jdk7-1.3.50.jar (version 1.3)
    C:/Users/username/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.3.50/b529d1738c7e98bbfa36a4134039528f2ce78ebf/kotlin-stdlib-1.3.50.jar (version 1.3)
    C:/Users/username/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.3.50/3d9cd3e1bc7b92e95f43d45be3bfbcf38e36ab87/kotlin-stdlib-common-1.3.50.jar (version 1.3)
    C:/Users/username/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.5.10/da6a904b132f0402fa4d79169a3c1770598d4702/kotlin-stdlib-1.5.10.jar (version 1.5)
    C:/Users/username/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.5.10/c49d0703d16c6cb1526cc07b9b46486da1dd8a60/kotlin-stdlib-jdk7-1.5.10.jar (version 1.5)
    C:/Users/username/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.5.10/6b84d926e28493be69daf673e40076f89492ef7/kotlin-stdlib-common-1.5.10.jar (version 1.5)
w: Some runtime JAR files in the classpath have an incompatible version. Consider removing them from the classpath

This began after installing the workmanager package. I have already set ext.kotlin_version = '1.5.10' in android\build.gradle and 
dependencies {
   classpath 'com.android.tools.build:gradle:4.2.1'
   classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}

Also in app\build.gradle:
dependencies {
   implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}


I've been stuck on this problem for a while now and so far none of the solutions I have read has resolved this. Please help!
Reply all
Reply to author
Forward
0 new messages