简体   繁体   English

我无法打开Android SDK和AVD Manager

[英]I can't open the Android SDK and AVD Manager

Alright. 好的。 I will elaborate the best I can with this problem i have. 我将用我遇到的这个问题详细说明。

I'm a new learner into developing android applications. 我是开发Android应用程序的新学习者。 I installed Eclipse Helios. 我安装了Eclipse Helios。

I downloaded the Android SDK tools version r10, installed it and stored it in C:\\Program Files\\Android. 我下载了Android SDK工具版本r10,安装它并将其存储在C:\\ Program Files \\ Android中。

I started up Eclipse and downloaded the ADT Plugin as instructed in the website http://developer.android.com/sdk/eclipse-adt.html#installing 我启动了Eclipse并按照网站http://developer.android.com/sdk/eclipse-adt.html#installing中的说明下载了ADT插件

After finishing downloading, I'm instructed to download additional components through Android SDK and AVD manager. 完成下载后,我被指示通过Android SDK和AVD管理器下载其他组件。

I clicked on the Android SDK and AVD button and this message appears: "Location of the Android SDK has not been setup in the preference" 我点击了Android SDK和AVD按钮,系统显示以下消息: “尚未在首选项中设置Android SDK的位置”

I'm instructed to go to Windows>Preference and update Android Preference SDK address: 我被指示转到Windows> Preference并更新Android Preference SDK地址:

I ran into the first problem when this message appeared at the top: 当此消息出现在顶部时,我遇到了第一个问题:

Could not find C:\\Program Files\\Android\\android-sdk\\platform-tools\\adb.exe! 找不到C:\\ Program Files \\ Android \\ android-sdk \\ platform-tools \\ adb.exe!

Fine I thought. 很好,我想。 I guess I'll find the file by browsing: 我想我会通过浏览找到该文​​件:

However, after finding the SDK file, nothing happens. 但是,找到SDK文件后,没有任何反应。 I can't click apply or anything! 我不能点击申请或任何东西! So frustrating! 真令人沮丧!

I read in forums that I should click Help>Check For Updates.. I did that: 我在论坛上看到我应该点击“帮助”>“检查更新”..我这样做了:

After that, I tried to set the Android preference again but nothing changed. 之后,我尝试再次设置Android偏好但没有改变。 I am completely lost. 我完全迷失了。 I've no idea what to do or how to solve this problem. 我不知道该怎么做或如何解决这个问题。 I noticed that the file adb.exe does not exist in tools but in platform-tools. 我注意到文件adb.exe在工具中不存在,但在平台工具中不存在。 But how am I supposed to get the file when the plug in won't even let me download it?? 但是,如果插件甚至不让我下载它,我该如何获取文件?

Also I'm curious about this as well: I went to the SDK file in my C:/ drive to have a look at it. 此外我也对此感到好奇:我在我的C:/驱动器中找到了SDK文件来查看它。

However, I can't find files that appears when I was browsing the SDK file while setting the Android preference: 但是,在设置Android首选项时,我无法找到浏览SDK文件时出现的文件:

I can't access the following files (docs, extras, samples, temp) 我无法访问以下文件(docs,extras,samples,temp)

I'm also aware that I need to update the PATH environment to platform-tools. 我也知道我需要将PATH环境更新为平台工具。 Once again, I can't do anything since I don't have the file. 再一次,我没有做任何事,因为我没有文件。 I hope this is elaborate enough. 我希望这很精细。

My ADB(adb.exe) file was not in the platform tools folder. 我的ADB(adb.exe)文件不在平台工具文件夹中。 I went to the Android SDK manager and noticed that the Android Platform Tools had not been downloaded. 我去了Android SDK管理器,发现没有下载Android平台工具。 I had to change the permissions on the Android Folders to get the install to work. 我不得不更改Android文件夹的权限以使安装工作。 Once the permissions were updated and the Platform Tools was successfully installed, it worked. 更新权限并成功安装Platform Tools后,它就可以正常运行。

You can run the SDK manager outside of Eclipse (if Eclipse won't let you run it). 您可以在Eclipse之外运行SDK管理器(如果Eclipse不允许您运行它)。

I updated the Folder permissions in order to get the downloads to work. 我更新了文件夹权限,以使下载工作。

If you think the problem is whitespace in the path: 如果您认为问题是路径中的空白:

Try changing the path to C:\\Progra~\\Android\\android-sdk if you have the SDK stored in Program Files, or 如果您将SDK存储在Program Files中,请尝试将路径更改为C:\\ Progra~ \\ Android \\ android-sdk,或者

Try changing the path to C:\\Progra~2\\Android\\android-sdk if you have the SDK stored in Program Files (x86), or 如果您将SDK存储在Program Files(x86)中,请尝试将路径更改为C:\\ Progra~2 \\ Android \\ android-sdk,或者

Try moving the SDK folder directly to C:. 尝试将SDK文件夹直接移动到C:。

all. 所有。 (I'm sorry for my english). (对不起我的英语)。

I faced with the same problem. 我遇到了同样的问题。 I use Windows 7 32bit at home and Windows 7 x64 at work. 我在家里使用Windows 7 32位,在工作时使用Windows 7 x64。 At home and at work I intalled android studio using the same intallation file. 在家里和工作中,我使用相同的安装文件安装了android studio。 But, at work everithing works correctly and doesn't work at home. 但是,在工作中,正常工作并且在家里不起作用。 It should be mentioned, that JAVA_HOME had been added to system variables list earlier as I use maven. 应该提到的是,当我使用maven时,JAVA_HOME已经被添加到系统变量列表中。 However I couldn't launch neither SDK manager nor AVD Manager in Android studio. 但是我无法在Android工作室中启动SDK管理器和AVD Manager。 I tried to find information in the Intenet, but almost everywhere I saw the same: "Setup JAVA_HOME". 我试图在Intenet中找到信息,但几乎到处都看到了相同的信息:“Setup JAVA_HOME”。 But I found advice here Android SDK and AVD Manager will not run . 但我发现这里的建议Android SDK和AVD Manager无法运行 It seems, that find_java.bat in ...\\android-studio\\sdk\\tools\\lib\\ can not define java.exe correctly. 看来,... \\ android-studio \\ sdk \\ tools \\ lib \\中的find_java.bat无法正确定义java.exe。 I modified android.bat file a little bit and it helped me. 我修改了android.bat文件一点点,它帮助了我。

So, I did next thing: 所以,我做了下一件事:

  1. Go to the folder, where your android studio was installed. 转到安装android studio的文件夹。 For me, its C:\\Program Files\\Android\\android-studio 对我来说,它的C:\\ Program Files \\ Android \\ android-studio
  2. The go to the sdk\\tools folder and open android.bat file for editing (for example, with notepad) 转到sdk \\ tools文件夹并打开android.bat文件进行编辑(例如,使用记事本)
  3. Find next text: set java_exe=call lib\\find_java.bat and replace it with set java_exe="%JAVA_HOME%\\bin\\java.exe" 查找下一个文本:set java_exe = call lib \\ find_java.bat并将其替换为set java_exe =“%JAVA_HOME%\\ bin \\ java.exe”

Thank you. 谢谢。

Don't know if this is the true issue. 不知道这是不是真的问题。 But are you referring to the SDK folder in the "SDK Location" field ? 但是,您是指“SDK位置”字段中的SDK文件夹吗? You referred as SDK File so i imagine that the apply is disabled because it's not the correct folder (like "C:\\Program Files\\Android\\android-sdk\\"). 您称为SDK文件,所以我想应用被禁用,因为它不是正确的文件夹(如“C:\\ Program Files \\ Android \\ android-sdk \\”)。

我猜问题是路径中的空白。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM