Reputation: 77
I want to disable gradle offline
mode for my Android project. But it seems that Android Studio v3.6 does not have any checkbox like other previous versions to control online/offline mode. What is alternatives to do that?
Upvotes: 2
Views: 1265
Reputation: 76769
This is not directly possible, because there only is an --offline
switch to enable it, but there is none to disable it. Therefore, you could only enable it on-demand with that command-line switch.
The only way I could think of, how it might work, is to use two different init scripts, with either: startParameter.offline=true
or startParameter.offline=false
. And then run them eg. with ./gradlew --init-script offline.gradle
or ./gradlew --init-script online.gradle
.
Upvotes: 1