代码如下: 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 或更高版本(推...
build.gradle的依赖配置项如下: 代码语言:txt AI代码解释 dependencies { implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.tencent.map:tencent-map-vector-sdk:4.4.0' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-...
(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 ...
buildscript{ext.kotlin\_version='1.3.50'repositories{// 这里做了修改,使用国内阿里的代理// google()// jcenter() maven { url 'https://maven.aliyun.com/repository/google' }maven{url'https://maven.aliyun.com/repository/jcenter'}maven{url'http://maven.aliyun.com/nexus/content/groups/public'...
2,修改项目下面的Android目录下面的build.gradle 里面的ext.kotlin_version ='1.6.20'到最新版本。 3,修改项目目录下面APP里面的build.gradle里面的targetSdkVersion31好像没有意义,30,31都没有问题。 4,没有修改flutter\packages\flutter_tools\gradle\flutter.gradle文件,因为里面已经是31版本了。
[!] Your project requires a newer version of the Kotlin Gradle plugin. update D:\Flutter\Code\flutter_demo\android\build.gradle: 解决方法: 找到项目下的\android\build.gradle文件 修改Kotlin_version为报错信息中最高的版本,即1.5.31 1 ext.kotlin_version ='1.5.31'...
All you need to do is to open the<your project>/android/build.gradlefile then updateext.kotlin_versionto a newer version. The screenshot below clearly depicts what I mean (but don’t use version1.6.10since it is too old. You will see how to find a proper version number just a...
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: "...