I am facing this error for many days and cannot resolve this:
Launching lib/main.dart on sdk gphone x86 64 in debug mode...
Running Gradle task 'assembleDebug'...
You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block:
https://flutter.dev/to/flutter-gradle-plugin-apply
e: file
///Users/metadots/.pub cache/hosted/pub.dev/background location tracker 1.4.3/android/src/main/kotlin/com/icapps/background location tracker/BackgroundLocationTrackerPlugin.kt90:50 Cannot access 'lifecycle': it is private in 'ProxyLifecycleProvider'
e: file
///Users/metadots/.pub cache/hosted/pub.dev/background location tracker 1.4.3/android/src/main/kotlin/com/icapps/background location tracker/BackgroundLocationTrackerPlugin.kt115:9 Cannot weaken access privilege 'public' for 'lifecycle' in 'LifecycleOwner'
e: file
///Users/metadots/.pub cache/hosted/pub.dev/background location tracker 1.4.3/android/src/main/kotlin/com/icapps/background location tracker/BackgroundLocationTrackerPlugin.kt115:21 'lifecycle' hides member of supertype 'LifecycleOwner' and needs 'override' modifier
e: file
///Users/metadots/.pub cache/hosted/pub.dev/background location tracker 1.4.3/android/src/main/kotlin/com/icapps/background location tracker/BackgroundLocationTrackerPlugin.kt167:9 'getLifecycle' overrides nothing
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task '
background location trackercompileDebugKotlin'.
A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log 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 43s
Error: Gradle task assembleDebug failed with exit code 1
Flutter version: 3.24.5