2021年3月28日星期日

Flutter Build Failing on Clean Installs

Suddenly my emulators and physical device fail whenever launching applications - I have tried a bunch of different SDKs on new virtual devices in Android Studio and my Pixel 3a phone but it keeps failing on run or debug. It works fine on Chrome. I have tried editing my gradle files in various ways using code I found in similar questions but nothing works so far.

Here is what I get in debug console:

Execution failed for task ':app:compressDebugAssets'.  > A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction  

Everything is looking good on Flutter Doctor.


Doctor summary (to see all details, run flutter doctor -v):  [√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)  [√] Chrome - develop for the web  [√] Android Studio (version 4.1.0)  [√] VS Code (version 1.54.3)  [√] Connected device (3 available)    • No issues found!  PS I:\Flutter\build> flutter doctor -v  [√] Flutter (Channel stable, 2.0.1, on Microsoft Windows [Version 10.0.19042.867], locale en-US)      • Flutter version 2.0.1 at C:\Users\BOXXUser\flutter      • Framework revision c5a4b4029c (3 weeks ago), 2021-03-04 09:47:48 -0800      • Engine revision 40441def69      • Dart version 2.12.0    [√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)      • Android SDK at C:\Users\BOXXUser\AppData\Local\Android\sdk      • Platform android-30, build-tools 30.0.3      • 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.    [√] Chrome - develop for the web      • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe    [√] Android Studio (version 4.1.0)      • Android Studio at C:\Program Files\Android\Android Studio      • Flutter plugin can be installed from:         https://plugins.jetbrains.com/plugin/9212-flutter      • Dart plugin can be installed from:         https://plugins.jetbrains.com/plugin/6351-dart      • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)    [√] VS Code (version 1.54.3)      • VS Code at C:\Users\BOXXUser\AppData\Local\Programs\Microsoft VS Code      • Flutter extension version 3.20.0    [√] Connected device (3 available)      • sdk gphone x86 (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)      • Chrome (web)            • chrome        • web-javascript • Google Chrome 89.0.4389.90      • Edge (web)              • edge          • web-javascript • Microsoft Edge 89.0.774.57    • No issues found!  

This is using a new install so pubspec file is autogenerated.

version: 1.0.0+1    environment:    sdk: ">=2.7.0 <3.0.0"    dependencies:    flutter:      sdk: flutter      cupertino_icons: ^1.0.2    dev_dependencies:    flutter_test:      sdk: flutter  

I have tried everything from Nougat to R in Android Studio SDK installer.

enter image description here

https://stackoverflow.com/questions/66847922/flutter-build-failing-on-clean-installs March 29, 2021 at 10:04AM

没有评论:

发表评论