My app works fine when I run it or build app packages, but when I try to build apk for release or profile, it gives this message:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':background_location:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
> Android resource linking failed
ERROR:C:\Users\Misha\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\background_location-0.6.1\android\src\main\AndroidManifest.xml:10:9-15:37: AAPT: error: attribute android:foregroundServiceType not found.
I've already tried flutter clean and flutter pub cache repair, as well as updated my Gradle version. flutter doctor says everything's fine. Also, I have AndroidX enabled.
My app works fine when I run it or build app packages, but when I try to build apk for release or profile, it gives this message:
I've already tried
flutter clean
andflutter pub cache repair
, as well as updated my Gradle version.flutter doctor
says everything's fine. Also, I have AndroidX enabled.