3

I'm trying to run a code in debug mode, and getting this error.

Launching lib\main.dart on sdk gphone x86 in debug mode...

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':flutter_plugin_android_lifecycle:javaPreCompileDebug'.
> Could not resolve all files for configuration ':flutter_plugin_android_lifecycle:debugCompileClasspath'.
   > Failed to transform artifact 'flutter_embedding_debug.jar (io.flutter:flutter_embedding_debug:1.0.0-5babba6c4d25fa237bbf755ab85c9a0c50b3c6ec)' to match attributes {artifactType=android-classes, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
 > Failed to transform 'C:\Users\SOLIC\.gradle\caches\modules-2\files-2.1\io.flutter\flutter_embedding_debug\1.0.0-5babba6c4d25fa237bbf755ab85c9a0c50b3c6ec\b458081743a320c57c360e4b8260848b361cb59d\flutter_embedding_debug-1.0.0-5babba6c4d25fa237bbf755ab85c9a0c50b3c6ec.jar' using Jetifier. Reason: invalid entry CRC (expected 0xc5a5fb23 but got 0x3162074). (Run with --stacktrace for more details.)

* 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 19s
Exception: Gradle task assembleDebug failed with exit code 1

More info: Please look into my github issue

2
  • try flutter clean? Commented Oct 8, 2020 at 8:17
  • I tried flutter clean , reinstalling flutter, restarting IDE, and flutter pub cache repair Commented Oct 8, 2020 at 8:21

2 Answers 2

4

First Option:

Upgrade your Flutter with

flutter channel stable && flutter upgrade

and then clean your flutter project and all the cache files with

flutter clean

and then run the flutter project:

flutter run

Second Option:

Remove the proxy setting inside your

~/.gradle/gradle.properties

Third Option:

Add repository which is inside your

app/build.gradle

The Edit:

maven {
    url 'http://download.flutter.io'
}
Sign up to request clarification or add additional context in comments.

1 Comment

I uninstalled android studio, removed flutter sdk and dart-sdk and reinstalled everything, after a while everything worked fine. But before that I have tried the first and third options. Both didn't work, I did not try the second option though.
1

in the andriod\settings.gradle change the 8.1.0

plugins {
    id "com.android.application" version "8.1.0" apply false
}

to 8.3.0

plugins { id "com.android.application" version "8.3.0" apply false }

and in the gradle\gradle_wrapper.properties change the 8.3

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

to 8.4

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

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.