Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No cached version of com.android.tools.build:gradle:3.3 available for offline mode

I did download gradle-3.3-all.zip from here, and extract that to C:\Program Files\Android\Android Studio\gradle\gradle-3.3\

In Android Studio File>Settings>Build, Execution,...>Build Tools>Gradle I changed setting to 'Use Local Gradle Distribution' and 'Gradle Home Path' changed to C:\Program Files\Android\Android Studio\gradle\gradle-3.3 and Offline Work in Global Gradle settings checked!

but this gradle error occur during build :

Error:No cached version of com.android.tools.build:gradle:3.3 available for offline mode.

Also when I change the offline work to unchecked this error occur :

Error:Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/3.3/gradle-3.3.pom'. Received status code 407 from server: Proxy Authentication Required

Also this path https://repo1.maven.org/maven2/com/android/tools/build/gradle/ does not contain gradle 3.3

what is my mistake?

like image 392
Younes Jafari Avatar asked Mar 27 '17 09:03

Younes Jafari


1 Answers

You are mixing gradle version and Android gradle plugin version.

classpath 'com.android.tools.build:gradle:2.3.0' // this is Android gradle plugin version

As of writing this, the latest stable version of gradle is 3.5. The latest stable version of Android Gradle plugin is 2.3.2.

like image 119
azizbekian Avatar answered Oct 27 '22 20:10

azizbekian