我正在尝试构建一个运行 flutter build apk --split-per-abi 的 apk,我收到此消息:
请注意,一周前这并没有发生。
FAILURE: Build failed with an exception.
* Where:
Script 'C:\sandbox\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 646
* What went wrong:
A problem occurred evaluating root project 'android'.
> A problem occurred configuring project ':app'.
> The value for this property cannot be changed any further.
* 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 4s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 5,5s
Gradle task assembleRelease failed with exit code 1
然后我运行 flutter doctor -v 来查看 android 和 flutter 是否已经过时。
更新并重新启动 Android Studio 后,我遇到了同样的错误。知道可能是什么问题吗?
C:\sandbox\AndroidStudioProjects\dataps05>flutter doctor -v
[√] Flutter (Channel stable, 1.22.4, on Microsoft Windows [Versión 10.0.18363.1256], locale es-ES)
• Flutter version 1.22.4 at C:\sandbox\flutter
• Framework revision 1aafb3a8b9 (7 weeks ago), 2020-11-13 09:59:28 -0800
• Engine revision 2c956a31c0
• Dart version 2.10.4
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at C:\Users\gabri\AppData\Local\Android\Sdk
• Platform android-30, build-tools 30.0.2
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[!] Android Studio (version 4.1.0)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] VS Code (version 1.51.1)
• VS Code at C:\Users\gabri\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.16.0
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.