i add the location package to my pubspec.yamel of project and when i build my project i get this error:
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:processDebugResources'. A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade Android resource linking failed G:\flutterproject\green_doctor\marketer\marketer\build\location\intermediates\library_manifest\debug\AndroidManifest.xml:11:9-15:56: AAPT: error: attribute android:foregroundServiceType not found.
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 55s The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility. Building plugin location... Running Gradle task 'assembleAarRelease'... √ Built build\app\outputs\repo. Building plugin location_web... Running Gradle task 'assembleAarRelease'...
F:\flutter.pub-cache\hosted\pub.dartlang.org\location_web-1.0.1\android\src\main\java\com\lyokone\location_web\LocationWebPlugin.java:3: error: cannot find symbol import androidx.annotation.NonNull; ^ symbol: class NonNull location: package androidx.annotation F:\flutter.pub-cache\hosted\pub.dartlang.org\location_web-1.0.1\android\src\main\java\com\lyokone\location_web\LocationWebPlugin.java:15: error: cannot find symbol public void onAttachedToEngine(@nonnull FlutterPluginBinding flutterPluginBinding) { } ^ symbol: class NonNull location: class LocationWebPlugin F:\flutter.pub-cache\hosted\pub.dartlang.org\location_web-1.0.1\android\src\main\java\com\lyokone\location_web\LocationWebPlugin.java:20: error: cannot find symbol public void onDetachedFromEngine(@nonnull FlutterPluginBinding binding) { } ^ symbol: class NonNull location: class LocationWebPlugin 3 errors
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':compileReleaseJavaWithJavac'. Compilation failed; see the compiler error output for 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 11s
Exception: The plugin location_web could not be built due to the issue above.
can enybody help me to solve this problem?