6

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

2 Answers2

3

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.

Esmaeil Ahmadipour
  • 840
  • 1
  • 11
  • 32
0

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.