升级项目的 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 或更高版本(推荐 8.x)。在android/gr...
解决方法: 在flutter项目下的android>build.gradle文件里修改kotlin 版本号 升级下 kotlin 版本 ext.kotlin_version = '1.3.72' 后可以运行 flutter 默认是 ext.kotlin_version = '1.3.50'
在flutter项目下的android>build.gradle文件里修改kotlin 版本号 升级下 kotlin 版本 ext.kotlin_version = '1.3.72' 后可以运行 flutter 默认是 ext.kotlin_version = '1.3.50'
AI代码解释 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/nexu...
Running "flutter pub get" in hello_proj... 894ms 💪 Building with sound null safety 💪 w: Runtime JAR files in the classpath should have the same version. These files were found in the classpath: /home/nidal/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk...
The binary version of its metadatais1.5.1, expected versionis1.1.15. [!] Your project requires a newer version of the Kotlin Gradle plugin. update D:\Flutter\Code\flutter_demo\android\build.gradle: 解决方法: 找到项目下的\android\build.gradle文件 ...
Execution failed for task ':app:compileDebugKotlin'. > Could not resolve all artifacts for configuration ':app:debugCompileClasspath'. > Could not download x86_debug.jar (io.flutter:x86_debug:1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408) > Could not get resource 'http://download.flutter...
把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代码解释 ...
首先在 android/src/main/kotlin/xyz/zhzh/flutter_hand_tracking_plugin 目录下创建两个 kotlin 文件: FlutterHandTrackingPlugin.kt 和HandTrackingViewFactory.kt 文件. 编写Factory 类 在HandTrackingViewFactory.kt 中编写一个 HandTrackingViewFactory 类实现抽象类 PlatformViewFactory. 之后编写的 Android 平台组件...
5、最后是可选升级,在android/gradle/wrapper下的gradle-wrapper.properties文件,可以将distributionUrl修改为gradle-5.6.2-all.zip的版本,同时需要将android/目录下的build.gradle文件的 gradle 也修改为com.android.tools.build:gradle:3.5.0; 另外kotlin插件版本也可以升级到ext.kotlin_version = '1.3.50'。