Привет всем, с чем я столкнулся с серьезной проблемой ... во флаттере я использую несколько пакетов, но когда я добавляю дополнительный пакет с именем: 'background_fetch', все перестает работать ... но если я оставлю этот пакет в покое, он начнет работать. Вот код в pubspe c .yaml:
с этим он не работает:
dependencies:
background_fetch:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
shared_preferences: "^0.4.2"
http: ^0.12.0+1
flutter_local_notifications: ^1.1.3
и с этим он работает:
dependencies:
background_fetch:
flutter:
sdk: flutter
это ошибка, когда я пытаюсь создать его как релиз:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':shared_preferences:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
C:\Users\MrFane\.gradle\caches\transforms-2\files-2.1\a1e87f5443b1512d74d302dbaa8fc6ba\core-1.0.0\res\values\values.xml:57:5-88:25: AAPT: error: resource android:attr/fontVariationS
ettings not found.
C:\Users\MrFane\.gradle\caches\transforms-2\files-2.1\a1e87f5443b1512d74d302dbaa8fc6ba\core-1.0.0\res\values\values.xml:57:5-88:25: AAPT: error: resource android:attr/ttcIndex not f
ound.
* 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 29s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 30.4s
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 background_fetch...
Running Gradle task 'assembleAarRelease'...
Running Gradle task 'assembleAarRelease'... Done 1.6s
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\flutter\.pub-cache\hosted\pub.dartlang.org\background_fetch-0.4.0\android\build.gradle' line: 5
* What went wrong:
A problem occurred evaluating root project 'background_fetch'.
> Plugin with id 'com.android.library' 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 1s
The plugin background_fetch could not be built due to the issue above.
большое спасибо, я надеюсь, что вы мне поможете!