4
votes

My current Gradle plugin version is 4.1.2 and this version working correctly but when I update to 4.1.3 I get this error and I can't build the project: Note:I added maven() and jcenter().

A problem occurred configuring root project 'AndroidCryptography'.

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

my build.gradle:

enter image description here

1
I recommend that you edit your question and provide a minimal reproducible example. In this case, that would be your project's top-level build.gradle file, most likely.CommonsWare
I think my build.gradle file doesn't have a problemsaeed noshadi
In any of your modules' build.gradle files (e.g., app/build.gradle), do you also have a buildscript closure? If so, you might want to check them too. Also, if you click the link in your question to the JAR, does it work? If the answer is no, then there is something about your network that is blocking access to that JAR, as it works from here.CommonsWare
Can you make sure you have at least the Gradle wrapper 6.5-all? https://services.gradle.org/distributions/gradle-6.5-all.zip. You can also try to run in the terminal: ./gradlew app:build -info and see which error is returning, might give you proper hints to the solution.xatokk

1 Answers

2
votes

You Have To Go To -->gradle-wrapper.properties and change your gradle version to 6.8.3

for more info you can load the attached image