Wanted to upgrade navigation version to 2.4.0-rc01, but I get this error when I do so
This version (1.0.5) of the Compose Compiler requires Kotlin version 1.5.31 but you appear to be using Kotlin version 1.6.0 which is not known to be compatible.
Anybody managed to get this to work?
Edit: My build.gradle
Project:
buildscript {
ext {
kotlin_version = '1.5.31'
navigation_version = '2.4.0-rc01'
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigation_version"
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"
}
}
App
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-parcelize'
id 'kotlin-kapt'
id 'androidx.navigation.safeargs.kotlin'
id 'dagger.hilt.android.plugin'
id 'com.google.secrets_gradle_plugin' version '0.4'
}
android {
signingConfigs {
debug {
storeFile file('C:\\Users\\olive\\.android\\debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
compileSdkVersion 31
buildToolsVersion "29.0.3"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
buildFeatures {
viewBinding true
dataBinding true
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.0.5'
kotlinCompilerVersion '1.5.31'
}
}
On a side note, I see that kotlinCompilerVersion is deprecated. Not sure if that's affecting anything, but still getting the same message.