Reputation: 1
I am new to android studio, when I enable Gradle offline mode it reports "sync failed No cached version of com.android.tools.build:gradle:4.1.1 available for offline mode." this have baffled me for a week wish someone could solve this for me
Upvotes: 0
Views: 1303
Reputation: 36423
Basically your Gradle is offline so it won't attempt to consult the network to download any dependencies that aremt already in its cache.
Please disable Gradle offline mode.
Open the Preferences window by clicking File→Settings (on Mac, Android Studio→Preferences).
In the left pane, click Build, Execution, Deployment > Gradle.
Check the Offline work checkbox.
Click Apply or OK.
OR
If you're building from the command line, pass the --offline
option.
Rebuild the Project.
Then re-enable Gradle offline mode again (if that's what you want).
Upvotes: 1