0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Could not connect to Kotlin compile daemon

Posted at

概要

以下のように怒られたのでメモ。

e: Daemon compilation failed: Could not connect to Kotlin compile daemon

原因

以下で説明されているように、Compose Compiler と kotlin のバージョンに互換性が無かった。

exception: error: this version (1.3.2) of the Compose Compiler requires Kotlin version 1.7.20 but you appear to be using Kotlin version 1.8.20 which is not known to be compatible.  Please fix your configuration (or `suppressKotlinVersionCompatibilityCheck` but don't say I didn't warn you!).

対応

Compose to Kotlin Compatibility Map を参照して Compose Compiler VersionKotlin Version の組み合わせを一致させる。

上記の場合、Compose Compiler Version と Kotlin Version の 1.3.2 と 1.7.20 という組み合わせに互換性がなかったわけなので、以下のように Compose Compiler Version を 1.4.6 に上げるか、kotlin のバージョンを 1.7.20 に変更する必要がある。

kotlinCompilerExtensionVersionの設定例
android {
    composeOptions {
        kotlinCompilerExtensionVersion = "1.4.6"
    }
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?