To Enable or Disable Gradle’s offline mode.
Click on the Gradle Which is at right side,
Click on the “Toggle Offline Mode” for enable or disable both
OR
To enable or disable
Gradle’s offline mode. First select View > Tool Windows > Gradle from
the menu bar. Then, near the top of the Gradle window, click Toggle
Offline Mode Gradle offline button in the Gradle panel.