代码如下: buildscript{ext.kotlin_version='1.5.31'// Kotlin版本repositories{google()// Google Maven仓库mavenCentral()// Maven中央仓库}dependencies{classpath'com.android.tools.build:gradle:7.0.2'// Android Gradle插件classpath"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"// Kotlin Gradle...
升级项目的 Kotlin 版本 升级项目的 Kotlin 版本以匹配依赖库的编译版本。 打开android/build.gradle,找到ext.kotlin_version,将其修改为与依赖项兼容的版本,例如1.9.20: ext.kotlin_version = '1.9.20' 1. 确保gradle-wrapper.properties中的 Gradle 版本与 Kotlin 版本兼容。例如,使用 Gradle 7.5 或更高版本(推...
/kotlin/Unit.class e: D:\Flutter\flutter\.pub-cache\hosted\pub.flutter-io.cn\wakelock-0.6.1+1\android\src\main\kotlin\creativemaybeno\wakelock\WakelockPlugin.kt: (30, 15): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5....
1,升级Gradle到7.4.2,在VScode终端运行gradle init重建gradle环境(因为项目在升级前建立,gradle版本是6.2),。 2,修改项目下面的Android目录下面的build.gradle 里面的ext.kotlin_version ='1.6.20'到最新版本。 3,修改项目目录下面APP里面的build.gradle里面的targetSdkVersion31好像没有意义,30,31都没有问题。 4,...
首先就项目升级的第一个,也就是最重要的一个,就是升级你的kotlin插件版本,这个是强制的,因为之前的旧版本使用的基本都是1.3.x的版本,而这些 Flutter 2.10 强制要求1.5.31以上的版本。 代码语言:javascript 代码运行次数:0 运行 AI代码解释 buildscript{-ext.kotlin_version='1.3.50'+ext.kotlin_version='1.5....
把ext.kotlin_version = '1.2.30'换成ext.kotlin_version = '1.2.71',把classpath 'com.android.tools.build:gradle:3.1.0'换成classpath 'com.android.tools.build:gradle:3.2.1'。 再打开gradle-wrapper.properties,如下: 代码语言:txt AI代码解释 ...
(version 1.7) /home/nidal/.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) w: Some runtime JAR files in the classpath have an incompatible version. Consider removing ...
dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation fileTree(dir: 'libs', include: ['*.aar']) // MediaPipe deps implementation 'com.google.flogger:flogger:0.3.1' implementation 'com.google.flogger:flogger-system-backend:0.3.1' implementation 'com...
versionName flutterVersionName multiDexEnabled true } } dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'androidx.multidex:multidex:2.0.1' } 打开android/app/build.gradlefile (notandroid/build.gradle) 在 apply plugin 下面添加以下行apply plugin: "...
To get the update-to-date version number of the Kotlin Gradle plugin, go to https://docs.gradle.org/current/userguide/compatibility.html#kotlin. Now run your project again, and it should work as expected: That’s it. Further reading: Flutter: Changing App Display Name for Android &...