There is no cached version of com.android.tools.build:gradle:1.2.3 for offline mode

I installed JetBrains IDEA 15.0.2 with android support on my computer, which is disconnected from the Internet. After that, synchronizing the project gives an error that gradle does not exist, so I solve the problem by downloading gradle 2.2.1 and extracting it to the appropriate position But after that a new synchronization error occurs, which says: "There is no cached version of com.android.tools.build : gradle: .1.2.3, available offline "How can I solve the problem while disconnecting my computer from the Internet.

+5
source share
2 answers

Try the following:

  • Cancel the "Offline Work" check in "File"> "Settings"> Gradle> Global Gradle Settings
  • Re-sync the project, for example, by restarting Android Studio
  • After synchronization, you can again check the parameter for working offline.
+13
source

I ran into a similar problem in Android studio because it also uses gradle, so my problem was that the source code of the application was written in the old version of gradle, but I have the latest Android studio with the latest gradle. therefore, the dependency of the class on the latest version of gradle has changed

Update path class dependency in build.gradle file at project level from

dependencies { classpath 'com.android.tools.build:gradle:1.2.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } 

before

 dependencies { classpath 'com.android.tools.build:gradle:2.1.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } 
+4
source

Source: https://habr.com/ru/post/1238361/


All Articles