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.
This version of the SDK Tools is designed to work with Android Studio 0.2.x and later. If you are developing without an integrated development environment (IDE), you must have Apache Ant 1.8 or later.
If you install Android Studio 2.2 or lower, you won't be able to re-download the components. In order to download components via the SDK manager, upgrade to a newer version of Android Studio. Android SDK Tools is a component for the Android SDK. It includes development and debugging tools for Android.
Open the SDK Manager from Android Studio by clicking Tools > SDK Manager or click SDK Manager in the toolbar. Click the checkbox next to Android SDK Platform-Tools so it shows a checkmark. A download icon should appear in the left column.
You can also follow these steps: 1. In the Android Studio welcome screen select Configure->Project Defaults->Project Structure. You will get to the following screen: 2. Select SDKs. If you don't have an Android SDK in that list then click the + icon and select Android SDK, now point to the SDK path.
Error:Could not download sdk-common.jar (com.android.tools:sdk-common:26.1.4): No cached version available for offline mode
Uncheck offline
work at first.File -> Settings ->Build, Execution,Deployment -> Build Tools -> Gradle ->
Uncheck Offline work
Then Clean-Rebuild and GRADLE
your project.
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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With