Reputation: 840
I made a Kotlin Multiplatform Mobile project using android studio and ran into the following error after importing SQLDelight:
e: This version (1.0.1) of the Compose Compiler requires Kotlin version 1.5.21 but you appear to be using Kotlin version 1.5.30 which is not known to be compatible. Please fix your configuration (or `suppressKotlinVersionCompatibilityCheck` but don't say I didn't warn you!).
I followed this question, however everything they mentioned I had already done correctly. After going file by file and failing to find where I had declared that version I decided to compare my project to one of the sample projects.
After going through the files again I found that I was using sqlDelightVersion 1.5.2 in my App grade.properties and they used 1.4.2 After changing it from 1.5.2 to 1.4.2 everything compiles.
Question is, why would something like this happen if SQLDelight has nothing to do with jetpack compose?
Upvotes: 2
Views: 4395
Reputation: 5235
Jetpack Compose is tightly bound to kotlin compiler version and it probably won't change soon (although, AFAIK, Google is talking to Jetbrains about stabilizing compiler plugin APIs for that NOT to happen. My source on that is a one of the Q&As with compose team).
If you want to use SQLDelight or any other library that is based on some other version of kotlin - you probably have to force proper kotlin version on gradle level (like here)
Upvotes: 1