类似的问题flutter build 类路径中的运行时 JAR 文件应该具有相同的版本。这些文件在类路径中找到
\n仅解决了新项目/sf/answers/4995393581/,但当我尝试旧项目时,错误仍然存在。我也尝试过flutter clean、重新启动设备等
\n\xe2\x9e\x9c xxxx git:(master) \xe2\x9c\x97 flutter build apk --release \n\n Building with sound null safety \n\nw: Runtime JAR files in the classpath should have the same version. These files were found in the classpath:\n /Users/yogiarifwidodo/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.6.10/e80fe6ac3c3573a80305f5ec43f86b829e8ab53d/kotlin-stdlib-jdk8-1.6.10.jar (version 1.6)\n /Users/yogiarifwidodo/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.7.10/1ef73fee66f45d52c67e2aca12fd945dbe0659bf/kotlin-stdlib-jdk7-1.7.10.jar (version 1.7)\n /Users/yogiarifwidodo/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.7.10/d2abf9e77736acc4450dc4a3f707fa2c10f5099d/kotlin-stdlib-1.7.10.jar (version 1.7)\n /Users/yogiarifwidodo/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.7.10/bac80c520d0a9e3f3673bc2658c6ed02ef45a76a/kotlin-stdlib-common-1.7.10.jar (version 1.7)\nw: Some runtime JAR files in the classpath have an incompatible version. Consider removing them from the classpath\ne: /Users/yogiarifwidodo/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.7.10/1ef73fee66f45d52c67e2aca12fd945dbe0659bf/kotlin-stdlib-jdk7-1.7.10.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module …Run Code Online (Sandbox Code Playgroud)