I'm messing about the android studio and having a problem with Gradle. I'm looking to put gradle on offline mode for more speed, but the error below pops up:
No cached version of com.android.tools.build:gradle:3.1.2 available for offline mode.
How to fix this?
I think you have to build the project online at lease once after adding the library and make it offline afterwards will solve your issue
For running project completely offline I have a small trick.
- Go to folder that you have already created project (build using online mode) for example C:\users\user\AndroidStudioProjects\project1.
- After that create a new project in Android Studio. And build it in offline mode.
- It shows same error. Now copy the .gradle and app folderfrom first project folder to second project folder.
- Now build and sinc project it will run perfectly.
- For this you should have atleast one "Hello World" project already build using online mode. After that copy this for all other projects.