From 3aeb0885a017bfc3f314e5438d73201b3cd49acb Mon Sep 17 00:00:00 2001 From: hailin Date: Mon, 23 Feb 2026 17:00:46 -0800 Subject: [PATCH] =?UTF-8?q?fix(android):=20=E5=90=AF=E7=94=A8=20core=20lib?= =?UTF-8?q?rary=20desugaring=20=E2=80=94=20=E4=BF=AE=E5=A4=8D=20flutter=5F?= =?UTF-8?q?local=5Fnotifications=20=E6=9E=84=E5=BB=BA=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit flutter_local_notifications 插件需要 Java 8+ API desugaring 支持。 在 build.gradle.kts 中启用 isCoreLibraryDesugaringEnabled 并添加 desugar_jdk_libs:2.1.4 依赖。 Co-Authored-By: Claude Opus 4.6 --- frontend/genex-mobile/android/app/build.gradle.kts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/genex-mobile/android/app/build.gradle.kts b/frontend/genex-mobile/android/app/build.gradle.kts index 8a5a83f..5245765 100644 --- a/frontend/genex-mobile/android/app/build.gradle.kts +++ b/frontend/genex-mobile/android/app/build.gradle.kts @@ -20,6 +20,7 @@ android { ndkVersion = flutter.ndkVersion compileOptions { + isCoreLibraryDesugaringEnabled = true sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } @@ -67,6 +68,10 @@ android { } } +dependencies { + coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4") +} + flutter { source = "../.." }