1

I'm facing the below error for the last 3 days, I tried everything to get rid of this error. I've even uninstalled android studio completely by following How to uninstall android studio completely and installed it again but the error is still there.

In possible suggestions, the android studio says Disable offline mode and rerun the build but the offline mode is already disabled.

I tried the following conversations:

  1. No cached version of gradle: the answers available in this question is all about turning the toggle Gradle offline and after trying the error is still there.
  2. What is "disable offline mode" and "disable gradle offline" mode

After looking at the answers to the above questions people appreciate that their problem has been solved but Idk what's wrong with my side.

Is there another option other than already available answers?

enter image description here

Shoaib Kakal
  • 1,090
  • 2
  • 16
  • 32
  • I don't see 7.1.1. on Google official website changeling but I can see 7.1.0 https://developer.android.com/studio/releases/gradle-plugin. Check on this website and try to use that Gradle version – Astha Garg Feb 14 '22 at 13:50
  • @AsthaGarg IDE suggests `A newer version of com.android.tools.build:gradle than 7.1.0 is available: 7.1.1` – Shoaib Kakal Feb 14 '22 at 13:54
  • Latest plugin version is 7.2 and required Gradle version of this is 7.3+. Check once with required gradle version this. Just refer the Gradle official site for any ref. Let me know if it helps – Astha Garg Feb 14 '22 at 13:57
  • Do you mean this one? https://docs.gradle.org/7.1.1/release-notes.html#upgrade-instructions – taipei Feb 14 '22 at 14:01
  • https://developer.android.com/studio/releases/gradle-plugin?buildsystem=ndk-build#updating-gradle this – Astha Garg Feb 14 '22 at 14:02
  • @ShoaibKhalid I don't think it's about offline/online mode, since studio is unable to resolve/find the Gradle version you are giving it's showing this error – Astha Garg Feb 14 '22 at 14:04
  • @AsthaGarg i've `gradle-version 7.2` in `gradle-wrapper.properties` and `com.android.tools.build:gradle:7.1.1` in `build.gradle(project)`. I think its okay, the only problem is with offline mode, i honestly don't whats going wrong. – Shoaib Kakal Feb 14 '22 at 14:05
  • which android studio version are you using? – Astha Garg Feb 14 '22 at 14:21
  • @AsthaGarg I was using Arctic fox after facing this problem I updated to bumblebee, the latest one but the error is still there. – Shoaib Kakal Feb 14 '22 at 14:33
  • Ya it's quite strange because I tried with same Gradle configuration are yours and it's working fine for me. Have you tried Invalidate cache and restart, sometimes it helps unexpectedly ? Secondly, try creating a sample project with same configuration see if it works – Astha Garg Feb 14 '22 at 14:39
  • @AsthaGarg can you please share your gradle.build files code in github gist? – Shoaib Kakal Feb 14 '22 at 14:44
  • @ShoaibKhalid https://github.com/asthagarg2428/Gradle-version-Check/blob/main/build.gradle (I created a Blank Activity project hence nothing much in grade file but yes the code is compilable) – Astha Garg Feb 15 '22 at 09:35

0 Answers0