Skip to main content

エラー “Module was compiled with an incompatible version of Kotlin” の解決

久々にAndroidStudioを起動してAndroidプロジェクトをビルドしようとしたらエラー吐かれたので、備忘録として置いておきます。

吐かれたエラー

Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.

モジュールは、互換性のないバージョンのKotlinでコンパイルされました。そのメタデータのバイナリバージョンは1.5.1で、予想されるバージョンは1.1.16です。

解決策

Kotlinのバージョンを変えてあげます。

build.gradleのext.kotlin_versionを1.4.32にすると無事に起動しました。

変更前

変更後

参考文献

android – “Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16” – Stack Overflow

Atria

大学生個人開発者| AtCoder(茶) / C# / VBA /その他趣味いっぱい