No cached version of gradle
In my case I also had an additional "offline switch" to the one in Gradle.
Go to:
File > Settings > Build, Execution, Deployment > Compiler
There I've removed the --offline
in Command-line Options
.
Earlier I was trying to speed up Android Studio a bit and this was one of the changes I had made.
Everything was fine after a restart then (and I have re-enabled both offline parts).
Gradle sync failed: No cached version available for offline mode
It seams like gradle
maps its cached dependencies using their absolute path, so moving .gradle
directory into another pc will not work if the full path of the parent differs between the two computers. to solve the problem i managed to change the path of my gradle
home on the online pc into "C:\Program Files\android.gradle" by setting the environment variable GRADLE_USER_HOME to that path. Then started android studio and built my application to cache dependencies. After that i was able to successfully copy .gradle
folder from the online machine into the offline one by placing it in the same path as the online machine gradle
path and pointing to that path through the EV GRADLE_USER_HOME.
Could not download gradle-4.0.0.jar No cached version available for offline mode
You need to disable gradle offline mode. This is how you can do it in andorid studio 4.1
Toggle gradle offline mode
No cached version of com.android.tools.build:gradle:3.3 available for offline mode
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
.
Related Topics
Android Fingerprint API for Time Attendance App
Android Studio - Processdebugresources Failed
How to Open One Particular Folder from Gallery in Android
Change Background Popupmenu in Android
Emulator: Warning: Quick Boot/Snapshots Not Supported on This Machine
Widgets Don't Respond When Re-Added Through Code
Permission Denial: Not Allowed to Send Broadcast in Android
How to Know the Calling Activity in Android
Fragment View in Viewpager Is Not Restored When Resuming
Onitemclicklistener and Onclicklistener Not Working for Listview
Android: Listview.Getscrolly() - Does It Work
Is Fcm (Firebase Cloud Messaging) Token for One Device or for One Account
How to Get Raw Preview Data from Camera Object at Least 15 Frames Per Second in Android
Is There an Android Based Google Glass Emulator
App Crashes on Startup Due to Java.Lang.Illegalargumentexception: Column '_Id' Does Not Exist