Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A problem occurred configuring project ':flutter_plugin_android_lifecycle'

Tags:

imagepicker

I added "image_picker: ^0.8.4+11" package to my project. After adding it was returning this error.

What went wrong: A problem occurred configuring project ':flutter_plugin_android_lifecycle'.

Could not resolve all artifacts for configuration ':flutter_plugin_android_lifecycle:classpath'. Could not find gradle-3.5.0.jar (com.android.tools.build:gradle:3.5.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.jar

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

like image 252
Abdolbasir Tibash Avatar asked Jun 30 '26 04:06

Abdolbasir Tibash


2 Answers

I have similar problem , on windows and Gradle:3.5.0 .

Any package that utilized this Gradle version would throw an error!

To resolve this issue, I cleaned the cache of Gradle in this address:

C:\Users\<MY_ACCOUNT>\.gradle\caches

And then , resync the project and android module.

like image 57
Esmaeil Ahmadipour Avatar answered Jul 05 '26 05:07

Esmaeil Ahmadipour


I updated the gradle to latest version and the problem was solved.

Go to android\gradle\gradle-wrapper.properties and change the gradle version to the last one.

like image 42
Abdolbasir Tibash Avatar answered Jul 05 '26 05:07

Abdolbasir Tibash



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!