0

Everytime I create a new flutter project and tried to run it on virtual device, I always get this error message

Execution failed for task ':app:compressDebugAssets'.

The solution I did is update the build.gradle and gradle-wrapper.properties from

build.grade

classpath 'com.android.tools.build:gradle:4.1.0'

gradle-wrapper.properties

distributionUrl=https://services.gradle.org/distributions/gradle-6.7-all.zip

To

build.grade

classpath 'com.android.tools.build:gradle:4.0.2'

gradle-wrapper.properties

distributionUrl=https://services.gradle.org/distributions/gradle-6.4.1-bin.zip

Since I'm just learning flutter, it's annoying that everytime I create a new project to learn I have to change those version.

Is there a way to set it up automatically new project? Or to support the newest version of gradle for new flutter project?

1 Answer 1

1

I too was experiencing this error, but only when building my flutter project from a USB drive (formatted as exFAT) connected to a Win10 system. Once I copied the project to my main drive (NTFS) and ran from there, it worked ok with the flutter gradle defaults.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.