Before the question I tried the suggested fix, hard-coding that NDK version, multiple times, it FAILED. Also I tried installing fresh, EVERYTHING FROM ANDROID STUDIO. IT DIDN’T WORK. PLEASE HELP ME ON THIS, JUST WANNA USE NOTIFICATION SERVICES.
Here’s what I see:
Your project is configured with Android NDK 26.3.11579264, but the following plugin(s) depend on a different Android NDK version:
-
flutter_local_notifications requires Android NDK 27.0.12077973
Fix this issue by using the highest Android NDK version (they are backward compatible).
Add the following to /home/moss/StudioProjects/trackit/android/app/build.gradle.kts:android {
ndkVersion = “27.0.12077973”
…
}
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:checkDebugAarMetadata’.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
An issue was found when checking AAR metadata:
1. Dependency ':flutter_local_notifications' requires core library desugaring to be enabled
for :app.
See https://developer.android.com/studio/write/java8-support.html for more
details.
- Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.
BUILD FAILED in 38s
Running Gradle task ‘assembleDebug’… 39.0s
Error: Gradle task assembleDebug failed with exit code 1