我正在开发Flutter应用程序,用于从Uri下载文件,为此我使用了downloads_path_provider
软件包。
但是当我构建我的应用程序时,它给了我以下错误:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':downloads_path_provider:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
C:\Users\User\.gradle\caches\transforms-2\files-2.1\a528b13ac93e64cafa3d0480e2c93207\core-1.1.0\res\values\values.xml:142:5-173:25: AAPT: error: resource android:attr/fontVariationSettings not found.
C:\Users\User\.gradle\caches\transforms-2\files-2.1\a528b13ac93e64cafa3d0480e2c93207\core-1.1.0\res\values\values.xml:142:5-173:25: AAPT: error: resource android:attr/ttcIndex 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 7m 20s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 442,7s (!)
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 downloads_path_provider...
Running Gradle task 'assembleAarRelease'...
Running Gradle task 'assembleAarRelease'... Done 11,5s
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'downloads_path_provider'.
> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
* 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 9s
The plugin downloads_path_provider could not be built due to the issue above.
我使用的软件包是否出错?
这是我的pubspec.yaml
:
version: 1.0.0+1
environment:
sdk: ">=2.6.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
badges: ^1.0.0
provider: 3.0.0
intl: ^0.16.1
http: ^0.12.0+4
shared_preferences: ^0.5.6+2
flutter_clean_calendar: ^1.0.2+1
path_provider: ^1.6.11
dio: ^3.0.9
downloads_path_provider: ^0.1.0
file_picker: ^1.13.0
open_file: ^3.0.1
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
dev_dependencies:
flutter_test:
sdk: flutter