2
votes

Flutter run produces the following error:

Target debug_android_application failed: Exception: Failed to bundle asset files. build failed.

FAILURE: Build failed with an exception.

  • Where:
    Script '/Users/kirk/Developer/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 896

  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildDebug'.

    Process 'command '/Users/kirk/Developer/flutter/bin/flutter'' finished with non-zero exit value 1

Any potential solutions on how to fix this?

2

2 Answers

0
votes

i think that you have compatibility issues between the build tools located in android/build.gradle and the gradle located in android/gradle/wrapper/gradle-wrapper.properties, try upgrade or downgrade one of them to be compatible with the other, check this table for compatibilites: https://developer.android.com/studio/releases/gradle-plugincompatibilites

0
votes

I had exactly the same problem where I couldn't compile or debug my Flutter app. To solve this, just go to tools and in Flutter selection, click on {open project for editing in Android Studio}. This will open only the Android counterpart and you will be able to update your gradle dependencies once the analysis is finished.