Модуль был скомпилирован с несовместимой версией Kotlin в выпуске Flutter.Android

Форум для тех, кто программирует под Android
Ответить Пред. темаСлед. тема
Anonymous
 Модуль был скомпилирован с несовместимой версией Kotlin в выпуске Flutter.

Сообщение Anonymous »


I build my apk's release version in flutter and I get these error multiple types:

e: C:/Users/Lenovo/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.8.22/1a8e3601703ae14bb58757ea6b2d8e8e5935a586/kotlin-stdlib-common-1.8.22.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0. here's my app/build.gradle:

plugins { id 'com.android.application' id "kotlin-android" id "dev.flutter.flutter-gradle-plugin" // Add the Google services Gradle plugin id 'com.google.gms.google-services' } dependencies { // Import the Firebase BoM implementation platform('com.google.firebase:firebase-bom:32.7.2') // TODO: Add the dependencies for Firebase products you want to use // When using the BoM, don't specify versions in Firebase dependencies implementation 'com.google.firebase:firebase-analytics' // Add the dependencies for any other desired Firebase products // https://firebase.google.com/docs/androi ... -libraries } def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { localPropertiesFile.withReader('UTF-8') { reader -> localProperties.load(reader) } } def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' } def flutterVersionName = localProperties.getProperty('flutter.versionName') if (flutterVersionName == null) { flutterVersionName = '1.0' } android { namespace "com.example.healthyisraeli" compileSdkVersion flutter.compileSdkVersion ndkVersion flutter.ndkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' } sourceSets { main.java.srcDirs += 'src/main/kotlin' } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/bu ... on-id.html). applicationId "com.example.healthy" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/and ... figuration. minSdkVersion 28 targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName } buildTypes { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. signingConfig signingConfigs.debug } } } flutter { source '../..' } dependencies {} apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.firebase.firebase-perf' android/build.gradle:

buildscript { ext.kotlin_version = '1.9.22' // Update to a compatible version repositories { google() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:8.3.0' classpath 'com.google.gms:google-services:4.3.15' classpath 'com.google.firebase:perf-plugin:1.4.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } plugins { // ... // Add the dependency for the Google services Gradle plugin id 'com.google.gms.google-services' version '4.3.15' apply false } allprojects { repositories { google() mavenCentral() } } rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { project.evaluationDependsOn(':app') } tasks.register("clean", Delete) { delete rootProject.buildDir } I tried updating the Kotlin version to 1.6.0 but than flutter results in an error that I need to use a newer Kotlin version. I run flutter clean and flutter pub get over and over but nothing seems to help.


Источник: https://stackoverflow.com/questions/780 ... er-release
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «Android»