Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio Error: "You must install the Android Support Repository though the SDK Manager"

I just initialised a project on Android Studio, and it was working fine in version 0.2.6, but in 0.2.7, I get this error:

enter image description here

It creates a folder inside my Applications directory, but it does not initialize the project. Any help regarding this problem would be appreciated. I get no problems with version 0.1.1 through version 0.2.6, but when it comes to 0.2.7, things start to get problematic, like this and I can't even start a project.

like image 595
Games Brainiac Avatar asked Sep 08 '13 06:09

Games Brainiac


People also ask

How do I fix Android SDK Manager not found?

Go to "SDK Tools" and install "Android SDK Tools" and "Android SDK Command-line Tools": You need to open Android Studio then go to Tools > SDK Manager > SDK Tools tab, uncheck the option Hide Obsolete Packages. And install Android SDK Tools and Android SDK Command-line Tools.

How do I install SDK Manager?

Download the latest "command line tools only" package from the Android Studio downloads page and unzip the package. Move the unzipped cmdline-tools directory into a new directory of your choice, such as android_sdk . This new directory is your Android SDK directory.

Where is the SDK manager in Android Studio?

To open the SDK Manager from Android Studio, click Tools > SDK Manager or click SDK Manager in the toolbar. If you're not using Android Studio, you can download tools using the sdkmanager command-line tool.

How do I download and install Android SDK Manager?

Install the SDKClick Tools > SDK Manager. In the SDK Platforms tab, select Android 12. In the SDK Tools tab, select Android SDK Build-Tools 31. Click OK to install the SDK.


2 Answers

With 2.7 update I got the same issue. It looks like now Android Studio thinks sdk lays in under its own folder at android-studio/sdk.

You should be able to use android app under android-studio/sdk/tools to get missing components (not tested).

Another solution would be to fix sdk path (tested):

Close any projects then drop to Welcome to Android Studio Dialog

  1. Select Configure -> Project Defaults -> Project Structure
  2. Select SDKs -> Android SDK -> Android SDK Home Path
  3. Update it to your previous sdk location.
like image 94
auselen Avatar answered Oct 16 '22 01:10

auselen


got the same problem when applying the last patch (2.7). I've resolved it by copying SDK Manager.exe from android-studio\sdk\tools\lib to android-studio\sdk\ then I've launched it and install the missing component.

After restarting Android Studio it works again !

like image 35
Gilles30 Avatar answered Oct 16 '22 01:10

Gilles30