5

I'm trying to learn Android programming. I installed Android Studio and installed the SDK for 28 - 24. Then I started a new project and set the minimum level to 26. As soon as Android Studio creates the project it attempts to build the project and immediately presents this error:

Error:Could not download sdk-common.jar (com.android.tools:sdk-common:26.1.4):
    No cached version available for offline mode

I've tried searching but haven't found any solution.
How can I fix this? Thanks.

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141
Vijer
  • 123
  • 4
  • 9

2 Answers2

4

Error:Could not download sdk-common.jar (com.android.tools:sdk-common:26.1.4): No cached version available for offline mode

  • You should Uncheck offline work at first.

File -> Settings ->Build, Execution,Deployment -> Build Tools -> Gradle -> Uncheck Offline work

Then Clean-Rebuild and GRADLE your project.

IntelliJ Amiya
  • 74,896
  • 15
  • 165
  • 198
1

You have to disable offline mode in android studio so that it can download all the required components /dependencies from network that are not available offline.

See this for how to disable offline mode in android studio: How to disable gradle 'offline mode' in android studio?

Qasim
  • 5,181
  • 4
  • 30
  • 51