热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

运行AndroidstudioIDE时出错-ErrorwhenrunAndroidstudioIDE

WhenIlaunchAndroidstudioIencounterthisError:当我启动Androidstudio时遇到此错误:Thefollowin

When I launch Android studio I encounter this Error:

当我启动Android studio时遇到此错误:

enter image description here

    The following SDK components were not installed: build-tools-21.1.1, source-21, sys-img-x86-addon-google_apis-google-21, 
    extra-android-m2repository, android-21, extra-google-m2repository, addon-google_apis-google-21, tools, platform-tools

And when I click retry, it gives me the same error:

当我点击重试时,它给了我同样的错误:

enter image description here

12 个解决方案

#1


16  

Configure a proxy for Android studio by modifying other.xml file at:

通过修改other.xml文件为Android studio配置代理:

C:\Users\"Your account"\.AndroidStudio\config\options\other.xml

Then change the proxy configurations as follows:

然后更改代理配置如下:

#2


12  

code.google.com/p/android/issues/detail?id=82789

  1. download build-tools21.1.1 google link or dehkadeco.ir link

    下载build-tools21.1.1 google link或dehkadeco.ir链接

  2. sdk will be located under C:\Users\<>\AppData\Local\Android\sdk.

    sdk将位于C:\ Users \ <> \ AppData \ Local \ Android \ sdk下。

  3. You may find that 21.1.2 is already in place C:\Users\<>\AppData\Local\Android\sdk\build-tools Create a folder with name "21.1.1" under this.

    您可能会发现21.1.2已经到位C:\ Users \ <> \ AppData \ Local \ Android \ sdk \ build-tools在此下创建一个名为“21.1.1”的文件夹。

  4. Copy all the files from the downloaded build-tools:21.1.1 under android-5.0 to C:\Users\<>\AppData\Local\Android\sdk\build-tools\21.1.1

    将下载的构建工具中的所有文件:android-5.0下的21.1.1复制到C:\ Users \ <> \ AppData \ Local \ Android \ sdk \ build-tools \ 21.1.1

  5. Start the Android studio now.

    立即启动Android工作室。

#3


3  

Try to rename folder 21.1.2 inside Android SDK build-tools folder (in my case it was c:\Users\prokofyev\AppData\Local\Android\sdk\build-tools\21.1.2) to android-5.0 (in my case it became c:\Users\prokofyev\AppData\Local\Android\sdk\build-tools\android-5.0). This way I fixed similar error on new Android Studio installation.

尝试将Android SDK build-tools文件夹(在我的情况下是c:\ Users \ prokofyev \ AppData \ Local \ Android \ sdk \ build-tools \ 21.1.2)中的文件夹21.1.2重命名为android-5.0(在我的它变成了c:\ Users \ prokofyev \ AppData \ Local \ Android \ sdk \ build-tools \ android-5.0)。这样我修复了新Android Studio安装上的类似错误。

#4


2  

Android Studio was not able to connect to internet in my work PC due to Intranet Proxy/Firewall settings, changing the proxy settings didnt help me either.

由于Intranet代理/防火墙设置,Android Studio无法在我的工作PC中连接到互联网,更改代理设置也没有帮助我。

Android studio was failing to run as it requires to install the above mentioned packages. As a work around I installed the packages from Android SDK Manager and it solved it.

Android工作室无法运行,因为它需要安装上述软件包。作为解决方法,我安装了Android SDK Manager中的软件包并解决了它。

You can find the SDK Manager under C:\Users\ \AppData\Local\Android\sdk\SDK Manager.exe In the GUI choose the following options whichever is relavant.

您可以在C:\ Users \ \ AppData \ Local \ Android \ sdk \ SDK Manager.exe下找到SDK Manager。在GUI中,选择以下选项,无论哪个是相关者。

  • Tools->All Android SDK Build-tools and SDK Platform-tools under version 21.*
  • 工具 - >版本21下的所有Android SDK构建工具和SDK平台工具。*

  • Everything under Android 5.0.1(API 21)
  • Android 5.0.1下的所有内容(API 21)

  • Everything under Extras
  • 额外的一切

After installation is complete try launching the Android Studio

安装完成后,尝试启动Android Studio

#5


1  

Adding to answer by @Erfan , If you are using automatic configuration script instead of a proxy server , Change the settings as below :

添加@Erfan的答案,如果您使用的是自动配置脚本而不是代理服务器,请更改以下设置:

C:\Users\"Your account".AndroidStudio\config\options\other.xml

Then change the line about proxy configurations like this:

然后更改关于代理配置的行,如下所示:


        
        
        

#6


1  

I had the same problem, But when I opened the studio "as administrator" error has gone!!! And my problem solved!!!! In my case I have installed the sdk in different location since I don't want install anything on my user folder.

我遇到了同样的问题,但当我以“管理员”的身份打开工作室时,错误已经消失!我的问题解决了!在我的情况下,我已经在不同的位置安装了sdk,因为我不想在我的用户文件夹上安装任何东西。

enter image description here

There is one more thing I have done that is I made the folder as writable from read access. (But I don't think this step is necessary)

我还做了一件事,就是我将文件夹设置为可读取访问权限。 (但我不认为这一步是必要的)

#7


1  

This usually happens when you can not download sdk from google, try to download it manually.

当您无法从谷歌下载sdk,尝试手动下载时,通常会发生这种情况。

You can get the build you mentioned at google or bellow link:

您可以在google或bellow链接中获得您提到的构建:

this link

Unzip it in \sdk\build-tools

在\ sdk \ build-tools中解压缩

#8


1  

Some tools are missing.

缺少一些工具。

Download build-tools_r21.1.1-windows.zip and unzip it. Run Android Studio again.

下载build-tools_r21.1.1-windows.zip并解压缩。再次运行Android Studio。

If you get similar error again Check this for missing android tools.

如果再次出现类似错误请检查此错误的android工具。

Enjoy coding..:)

#9


0  

For Ubuntu users, check that the folder where the SDK will be installed has permissions.

对于Ubuntu用户,请检查将安装SDK的文件夹是否具有权限。

#10


0  

I also had the same problem. See the picture below:

我也有同样的问题。见下图:

enter image description here

Solution: Run it as an administrator.

解决方案:以管理员身份运行它。

enter image description here

#11


0  

If you are getting UnknownHostException the the problem lies in the proxy - click the close icon (the X in the upper right corner) and agree to start setup next time again. Then in the Studio itself go to Configure -> Settings -> search for proxy and set up your proxy (auto-detect or manual).

如果您收到UnknownHostException,则问题出在代理中 - 单击关闭图标(右上角的X)并同意下次再次开始设置。然后在Studio中转到配置 - >设置 - >搜索代理并设置代理(自动检测或手动)。

Running as administrator might help as well

以管理员身份运行也可能有所帮助

#12


0  

download build-tools:21.1.1 from build-tools_r21.1.1-windows.zip

从build-tools_r21.1.1-windows.zip下载build-tools:21.1.1

and unzip, it will extract the entire folder to copy or move your sdk /build-tools folder. name folder must be build-tools_21.1.1

并解压缩,它将提取整个文件夹以复制或移动您的sdk / build-tools文件夹。 name文件夹必须是build-tools_21.1.1


推荐阅读
author-avatar
BB_KYLE
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有