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 3 years have passed since last update.

Koin3.1 + Ktor 1.6以降におけるNoSuchMethodError

Last updated at Posted at 2022-04-07

事象

Koin 3.2より前のバージョンの場合、Ktor 1.6.0以降のKtor起動開始時、NoSuchMethodErrorの例外が発生し、起動できない。

動作環境

  • Kotlin 1.6.10
  • Ktor 1.6.7
  • Koin 3.1.5

対処方法

Koinのissue #1188に同事象の記載があり、
ワークアラウンドとして、ロガーのログレベルにERRORを設定すれば、回避可能。

install(Koin) {
        //ロガーのログレベルにERRORを設定。
        slf4jLogger(level = Level.ERROR)

        modules(
            省略
        )
}

なお、Koin 3.2はKtor 1.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?