はじめに
延々ハマったのでメモ。
何が起こったか
ビルド時に
The compiler option dagger.hilt.android.internal.projectType is not a recognized Hilt option. Is there a typo?
というエラーが出てビルドに失敗する。
原因
DaggerHiltのプラグインのバージョンが合ってなかった!!
Android Gradle Plugin Version が7.4.0, Gradleが7.5 の場合は
com.google.dagger:hilt-android-gradle-plugin:2.40.5
だと動いた。
補足
Gradleのバージョン確認は
File > ProjectStructure > Project から確認/再設定できるよ