Compatibility issue between Android Compose and Kotlin (solved!)

Compatibility issue between Android Compose and Kotlin (solved!)

Since the latest March, I have been experimented with Android Compose to build some new apps. I have liked the experience of developing using Android Compose since there. But, one common issue that I have faced usually is shown below:

Incompatibility between Android Compose and Kotlin

When I try to use the latest stable version of Android Compose with the newest version of Kotlin, it is shown the previous error message. This is bad because it is hard to find the default and reliable setup to develop with Android Compose.

The solution

In June, Google published this post:

The solution

The Android Compose Compiler broke away from the Android Compose library. Therefore, Android Developers can use the latest improvements/bug fixes from Android Compose libraries and Kotlin without worrying about compatibility issues.

So to keep this new context, we should declare a separate version for Android Compose Compiler:

Latest stable versions of Android Compose libraries in June 2022

A mapping table keeps the compatibility between Android Compose Compiler and Kotlin:

Latest compatible versions of Android Compose Compiler and Kotlin

After setting the default setup with the marked versions and building, we have now:

It is Solved!
Show Comments