CalendarViewライブラリでカレンダーを表示したいが、設定でコンパイルエラーが起きている
解決したいこと
CalendarViewライブラリでカレンダーを表示したいが、設定でコンパイルエラーが起きている。
経緯
kotlinでAndroidアプリ開発の勉強を始めた初心者です。
JetpackComposeでUIの作成などを学んできました。
カレンダー機能のあるアプリを作りたくて、CalendarViewライブラリの使用方法を調べていました。
https://github.com/kizitonwose/Calendar
公式のGithubに記載のある手順で設定を行っていましたが、
step1で追加したコードがコンパイルエラーとなっており先に進めません。
また、どこのバージョンのことなのか、調べ方がわかりません。
現在の環境
・AndroidStudio iguana
・以下にbuild.gradleファイル載せています
手順step1で追加したコード(一部)
dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:<latest-version>'
}
発生している問題・エラー
Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public val NamedDomainObjectContainer<Configuration>.coreLibraryDesugaring: NamedDomainObjectProvider<Configuration> defined in org.gradle.kotlin.dsl
Unexpected tokens (use ';' to separate expressions on the same line)
自分で試したこと
記述を既存のコードに合わせたりしてみましたが変わりませんでした。
<latest-version>
の部分に自分の環境のバージョンを記載するのかな?と思ったのですが
どこの部分のどのバージョンなのかがわかりませんでした。
build.gradleを載せます。(dependencies以前まで)
android {
namespace = "com.example.myapplication"
compileSdk = 34
defaultConfig {
applicationId = "com.example.myapplication"
minSdk = 24
targetSdk = 34
versionCode = 1
versionName = "1.0"
multiDexEnabled = true
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true
}
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.1"
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}
...~
0