[英]Build release failed Flutter
我正在嘗試使用顫振構建 apk。 但是每次我運行flutter build apk
或flutter build apk --release
Build 總是因為這樣的異常而失敗。
Running Gradle task 'assembleRelease'...
Removed unused resources: Binary resource data reduced from 44KB to 35KB: Removed 20%
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':webview_flutter:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
C:\Users\naonv\.gradle\caches\transforms-2\files-2.1\0a271e99b6771ad4a84318244d532fb7\core-1.0.0\res\values\values.xml:57:5-88:25: AAPT:
error: resource android:attr/fontVariationSettings not found.
C:\Users\naonv\.gradle\caches\transforms-2\files-2.1\0a271e99b6771ad4a84318244d532fb7\core-1.0.0\res\values\values.xml:57:5-88: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 5m 12s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 315.2s (!)
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
✏️ Creating `android\settings_aar.gradle`... 178ms
√ `android\settings_aar.gradle` created successfully.
Building plugin webview_flutter...
Running Gradle task 'assembleAarRelease'...
Running Gradle task 'assembleAarRelease'... Done 37.6s
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
WARNING: The option setting 'android.enableR8=true' is experimental and unsupported.
The current default is 'false'
Consider disabling R8 by removing 'android.enableR8=true' from your gradle.properties before publishing your app.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'webview_flutter'.
> 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 36s
The plugin webview_flutter could not be built due to the issue above.
這也發生在顫振示例應用程序中,也許我的設置有問題,但我不知道我需要編輯哪個,有人知道如何解決這個問題嗎?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.