目次
step3: ktolin のバージョンを 1.7.0 に改良する
step4: compileSdkVersion と targetSdkVersion を 31 に増やしました
このエラーは、主に kotlin のバージョンの問題が原因です。
step1: kotlin プラグインのバージョンを上げる
ルート ディレクトリ build.gradle、kotlin-gradle-plugin バージョンを次のように改善します。
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
step2: settings.all を設定する
ルートディレクトリ build.gradle
configurations.all {
resolutionStrategy {
force 'androidx.core:core-ktx:1.7.0'
}
}
step3: ktolin のバージョンを 1.7.0 に改良する
app ディレクトリの build.gradle
implementation 'androidx.core:core-ktx:1.7.0'