diff --git a/app/build.gradle b/app/build.gradle index f7cbbb9..e946493 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -77,6 +77,7 @@ android { } compileOptions { + coreLibraryDesugaringEnabled true sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } @@ -214,6 +215,8 @@ dependencies { implementation project(path: ':niceimageview') implementation project(path: ':iconloader') + coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5' + // 添加 Kotlin 标准库 implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" // 添加这行,使用 BOM 统一 Kotlin 相关库的版本