Android SDK failed to install

醉酒当歌 提交于 2020-01-02 05:12:35

问题


I saw a good tutorial on youtube to install the Android SDK on windows, i attempted it on my window 7 pc. I tried many times but still i failed. I have java JDK and Eclipse latest version installed but the only problem is that Android SDK didn't able to fetch some packages and i am unable to use it. The following error occurs:

How to deal with this problem? I want to learn and develop Android apps.


回答1:


Try to remove everything related to Android and Java SDK as well as Eclipse. Try to install as follows:

  • Download and install JDK (java)
  • Download and install Eclipse
  • Download and install Android SDK

While downloading Android SDK try to do some if it does not fetch the files go to the Tools -> options -> and there checked Force https ok! You can also download the ADT plugin and add it through Eclipse. I think it will work fine. Go to this link which has whole latest SDK and installation ideas.

If i told you whatever follow the same patter and you will get it.

If you don't succeed in getting your SDK installed then I say you try to repair your computer by installing the fresh copy of Window 7 OS and try to choose English language this time.




回答2:


First of all :

uninstal android SDK then check to remove any traces folder related to android and remove it manually from Program Files folder and from Documents and Settings folder ,

then uninstall java JDK also and eclipse ,

( which mean clean your computer from any thing related to android development preparation ) ,

now start again as follow :

1- Download latest java from this link : http://jdk7.java.net/download.html then install it .

2- download latest android SDK from this link: http://developer.android.com/sdk/index.html then install it , once finish install dont run it .

3- download latest eclipse from this link : http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/junor copy zip file to C folder and extract it in C folder it self ,

RUN ECLIPSE THEN :

1-Downloading the ADT Plugin :

a) Start Eclipse, then select Help > Install New Software.

b) Click Add, in the top-right corner:

In the Add Repository dialog that appears write this

for the Name : ADT Plugin,

and the following URL for the Location:http://dl-ssl.google.com/android/eclipse/

Then Click OK.

d) in the software dialog, select the checkbox next to developer tools and clicks next.

e) in the next window, you will see a list of the tools to download ,

click next.

f) Read and accept the license agreements, click Finish.

H) When the installation completes, restart Eclipse.

2- Select Window > Preferences... to open the Preferences panel

a) Select Android from the left panel.

b) For the SDK Location in the main panel click browse… and locate your downloaded SDK directory then Click Apply, then OK.

3-open in eclipse: window then Android SDK manger and download any platform you want to start development with it .

some times maybe due to busy server of android site it gave error then later time it will fetch all download package you predetermined and download it succesfully .

hope this help .




回答3:


Instead of the video tutorial, try this official tutorial:

http://developer.android.com/sdk/installing.html

It mentions about the alternate links also from where you can update the sdk.

Edit:

If you are still facing the problem, you can try this hack instead. You'd need another PC for that. What I can tell you that there must be some problem in your PC, so try downloading the required packages on any other PC. (Though you can still work with basic package, if you just want to learn and no to target a specific Android OS version).

After downloading, just go to the android SDK folder on the second PC, copy it in a pen drive and just paste the folder on your existing installation.

I always do this hack whenever I need to install the SDK on a PC without any internet connection and voila!! It works every time. Let me know if it worked for you or not.




回答4:


I faced similar problem during the installation of SDK on my PC.

Start SDK manager from All programs and try to install APIS.I guess you are trying to install these from Eclipse SDK manager button.Starting SDk Manager from your Eclipse cause this problem. Both are same. But it worked for me.




回答5:


Setup your Android Environment in easy way.

Required Files:

  • Java Development Kit (JDK) Download
  • Eclipse – Eclipse 3.6.1 or Helios is the version I’m using. Download
  • Android Development Tools (ADT) Plugin – custom plugin so we can build Android applications using Eclipse IDE. Download
  • Android SDK Starter Package – includes the core SDK Tools. Download
  • Android SDK Tools, revision 10 – the complete tools component of the SDK. Download
  • Android SDK Platform-tools, revision 3 – platform tools component of the SDK. Download
  • Android SDK Platform – our target Android OS.

Android SDK Platform:

  • [Android SDK Platform 3.0, revision 1 (Honeycomb)] : https://dl-ssl.google.com/android/repository/android-3.0_r01-linux.zip
  • [Android SDK Samples for Android API 11, revision 1] : https://dl-ssl.google.com/android/repository/samples-3.0_r01-linux.zip

  • [Android SDK Platform 2.3.3._r1 (Gingerbread)] : http://dl-ssl.google.com/android/repository/android-2.3.3_r01-linux.zip

  • [Android SDK Samples for Android API 10, revision 1] : http://dl-ssl.google.com/android/repository/samples-2.3.3_r01-linux.zip

  • [Android SDK Platform 2.2_r1 (Froyo)] : http://dl-ssl.google.com/android/repository/android-2.2_r02-linux.zip

  • [Android SDK Samples for Android API 8, revision 1] : http://dl-ssl.google.com/android/repository/samples-2.2_r01-linux.zip

STEPS:

  1. Install the JDK using the default setup.

  2. On your Android developer folder (ex. C:\Developers\Android) place all the zip files you just downloaded.

  3. Create a workspace folder on your home folder (ex. C:\Developers\Android\workspace).

  4. Unzip the Android SDK Starter Package (android-sdk_r10-windows.zip). NOTE: I suggest to use WinRAR so we can just right-click the zip file and then choose Extract Here

  5. We now have the android-sdk-windows folder on our android developer folder. Inside this folder, delete the tools folder. Move the Android SDK Tools (tools_r10-windows.zip) and Android SDK Platform-tools (platform-tools_r03-windows.zip) zip files to this folder. Unzip them and rename as tools andplatform-tools respectively.

  6. Inside android-sdk-windows folder there’s a platforms folder. Move and unzip the Android SDK Platform file (android-2.3.3_r01-linux.zip) on this folder.

  7. Inside android-sdk-windows folder, create samples folder. Move and unzip the Android SDK Samples zip file (samples-2.3.3_r01-linux.zip) to this folder.

  8. Unzip the Eclipse file (eclipse-SDK-3.6.1-win32-x86_64.zip).

  9. Inside eclipse folder, run eclipse.exe. It will ask for the workspace folder to use. Choose the workspace folder you created. You can optionally check theUse this as the default and do not ask again checkbox and then click OK.

  10. Still on Eclipse, select Help > Install New Software…. Click Add, in the top-right corner and then click Archive… Browse and select the downloaded ADT zip file (ADT-10.0.0.zip). Enter a name for this update site (ex. ADT Plugin) in the Name field and then click OK.

  11. Check the Developer Tools checkbox or click the Select All button and then click Next button and then accept the defaults. (Sorry, you need to be online as some component need to be downloaded at this part. I’ll update it once I know how to do the offline mode of it). After the installation, Eclipse should be restarted.

  12. On Eclipse, select Window > Preferences. Select Android on the left pane. On SDK location, browse the select the Android SDK folder (android-sdk-windows) then click Apply.

  13. Still on Eclipse, select Windows > Android SDK and AVD Manager. Click the Installed Packages on the left pane and you will notice, there’s SDK Platform Android 2.3.3, API 10, revision 1 and Samples for SDK API 10, revision 1. We are now ready to create virtual devices.

  14. Click Virtual Devices on the left pane. Click New button and give the virtual device a name (ex. Gingerbread). Select Android 2.3.3 API Level 10. Type 512 or more for SD Card size and then click Create AVD button. We are now ready to create our famous “Hello World” application.




回答6:


You could try removing what you have and starting again from the beginning. I'm also on Windows 7, and I highly recommend downloading the zip file (not the installer) for the SDK and extracting it to C:\. It should automatically create a folder named "android-sdk-windows" but you can rename it if you wish. Then run the SDK Manager and start downloading packages. It may help to babysit the package downloader and jiggle your mouse every minute or so (yes, that sounds silly, but it actually made a difference for me because the downloads kept stopping partway through when I didn't do anything).




回答7:


Try this.

Tools -> options -> check Force https ...




回答8:


Download the latest sdk from http://developer.android.com/sdk/index.html and try again ! It should not appear again for sure.




回答9:


are you running the sdk manager from administrator?? If not , right click on your SDK Manager and select Run as Administrator.. May be that will help...




回答10:


For me the SDK was very tricky, too. It didn't get all the packages and downloaded very slow (about 15-20 kbps with 24 Mbps connection). Then I tried to run the program with administrator privileges and it fixed the problems.




回答11:


Make sure Android SDK, JDK, and Eclipse are all either 64 bit or 32 bit. If one is different (e.g. Eclipse is 32-bit while the others are 64-bit), you will get errors.



来源:https://stackoverflow.com/questions/9319195/android-sdk-failed-to-install

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!