Android Studio Error: “You must install the Androi

2019-01-14 17:44发布

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.

9条回答
戒情不戒烟
2楼-- · 2019-01-14 18:07

Just as Leonidos said, install ASR through SDK Manager:

Tools > Android > SDK Manager ; Navigate to the Extras folder, and select Android Support Repositories.

Click install packages and it will work fine

查看更多
神经病院院长
3楼-- · 2019-01-14 18:19

For some reason, if you install Android Studio in the same directory as the SDK, this error will pop up. Just install it somewhere else. For instance, I had it installed at C:\Android\, along with the SDK. Then, I decided to install it at C:\Program Files (x86)\Android Studio and it simply worked.

查看更多
ゆ 、 Hurt°
4楼-- · 2019-01-14 18:20

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.
查看更多
狗以群分
5楼-- · 2019-01-14 18:23

to solve this problem I used this link: Downloading the Support Libraries

查看更多
你好瞎i
6楼-- · 2019-01-14 18:23

You must manually run SDK Manager.

Folder: android-studio/sdk/tools

Search for android or android-sdk

The new Support Repository must be already selected, and you need only click the "Install" button.

查看更多
够拽才男人
7楼-- · 2019-01-14 18:27

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 !

查看更多
登录 后发表回答