Android SDK failed to install - android

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.

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.

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 .

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.

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.

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).

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

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

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...

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.

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.

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:
Install the JDK using the default setup.
On your Android developer folder (ex. C:\Developers\Android) place all the zip files you just downloaded.
Create a workspace folder on your home folder (ex. C:\Developers\Android\workspace).
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
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.
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.
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.
Unzip the Eclipse file (eclipse-SDK-3.6.1-win32-x86_64.zip).
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.
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.
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.
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.
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.
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.

Related

Installing android studio on a mac mini using USB

I need to install Android Studio in a third world country with very poor internet connection. Is it possible to download everything I need into a USB stick in the US and then go there and install?
Yes it possible but you would need to download both Android Studio and the SDK. You can do so from this page http://developer.android.com/sdk/installing/index.html.
Downloading Android Studio is simple enough. Copy it to USB and then transfer it to your machine and install. You will need an internet connection to update Android Studio when updates come out though.
The SDK is a bit different. Download the SDK tools from the above link. Once that is download save the SDK tools to a USB. The SDK can be saved anywhere and transferred to another machine easily as Android Studio points to an external location for the SDK. In this case, once the SDK is downloaded, update the SDK and get the API's and emulator images that you want by calling either of the two below:
On Windows, double-click the SDK Manager.exe file at the root of the
Android SDK directory.
On Mac or Linux, open a terminal and navigate to the tools/ directory
in the Android SDK, then execute android sdk.
Then you can transfer the SDK tools folder (which should now have grown in size) wherever you want on your machine and just point Android Studio to it by following the below steps:
File -> project Structure into Project Structure
SDK Location (in the left hand panel)
Select Android SDK location (for versions of Android Studio before 1.0.1, press +, add another sdk)

Sdk Manager not opening from eclipse

SDK Manager is not opening from eclipse. An initialization screen comes but the SDK Manager doesn't open. I have tried renaming android.bat file but that doesnt work. Re-installing has also been tried.
The possible reason for this to happen is you might have installed the plugin in a wrong way or the destination of the file might have changed by some means.
Make sure these 2 are correct on the 1st place.
If you are confident about these 2 are proper. Make sure the actual SDK_Manager.exe runs directly from its folder destination if double clicked.
which will be present in your android SDK path--->\Android\android-sdk\SDK Manager.exe
Open android.bat in sdk/tools folder by right click on it and click edit
find the line-
set java_exe=
edit it to your path to java.exe like
set java_exe=C:\Program Files\Java\jre7\bin\java.exe
then delete the next line which is
call lib\find_java.bat
This one worked for me......
Check out this link......
After 2 days of frustration not getting solution to launch SDK Manager manually and in Eclipse. Finally, I figured out the solution and whatever solution available elsewhere is not correct on recent development. Thought of adding this info of Android SDK for new to mobile testing enthusiast:
Android encourages users to use Android IDE, so you don't find Android ADT bundle zip file in the site. You may need to download from untrusted source if you want to configure SDK to Eclipse manually.
Solution:
Download JDK, install it, set environment variables for JDK and JRE in your system. (if not sure, please see videos of how to install JDK)
Download Eclipse, unzip it and launch Eclipse
In Eclipse, Go to Windows and click Install new software
Enter this url in work-with: https://dl-ssl.google.com/android/eclipse/ and press Enter
Select Developer Tools checkbox and click Next and finish
Click Ok for permission in popup
Click OK to restart Eclipse
Click Cancel in setting SDK in preferences
Parallely, Android Installation Tool windows opens up, click next
Select automatically downloading Android SDK tools and api versions
It downloads all required tool, it restarts the eclipse, sets preferences,
Now you can launch SDK Manager from Eclipse or go to SDK tools folder and launch Android in tools folder.
The reason of this is using newer version of android sdk tools.
Eclipse supports sdk tools version 25.2.5 and build-tools version 25.0.3. The reason is google has removed some optional/deprecated tools from sdk tools in release 25.3.0. But eclipse needs them to work with android projects. So the thing you can do is delete tools folder from your sdk and download eclipse supported version
Android SDK Tools:
https://dl-ssl.google.com/android/repository/tools_r25.2.5-windows.zip
https://dl-ssl.google.com/android/repository/tools_r25.2.5-linux.zip
https://dl.google.com/android/repository/tools_r25.2.5-macosx.zip
Extract them in your sdk installation directory.
You can now access to SDK manager by using the android command, which is located in tools directory of your sdk. You can also do this from eclipse.
Note that Eclipse supports build-tools version 25.0.3 and older, so you will have to download them. For other tools you can select latest version. They are supported by eclipse.

adding API to android sdk

I have downloaded android APIs and I've copied one of them to this path
H:\Android\android-sdk\platforms\api
But again in SDK none of APIs wasn't installed.
THe sdk is what is suppose to be used to install the API you should not be copying it.
follow:
You can launch the SDK Manager in one of the following ways:
From Eclipse (with ADT), select Window > Android SDK Manager.
On Windows, double-click the SDK Manager.exe file at the root of the Android SDK directory.
On Mac or Linux, open a terminal and navigate to the tools/ directory in the Android SDK, then execute android sdk.
You can select which packages you want to download by toggling the checkboxes on the left, then click Install to install the selected packages.
The link below will give you more pointers.
http://developer.android.com/tools/help/sdk-manager.html
You need to use Android SDK Manager to download the APIs for Android. Check this:
http://developer.android.com/tools/help/sdk-manager.html

Android Studio SDK Managed Disabled

I just downloaded the Android Studio .dmg for OSX. Per the installation instructions, I've dragged it to the application folder and launched the application.
But the SDK Manager and AVD Manager are greyed out and are impossible to use.
Any ideas on an installation step I may have missed?
For people coming for this same problem for Windows: you won't have an Android SDK anywhere if it is your first time with Android. Also, here the Android Studio doesn't come with a packed SDK Manager, so you need to download one.
So this is what you may do:
Download the SDK Manager and an Android SDK
Download the SDK Manager from: http://developer.android.com/sdk/. Use the link that says "Get the SDK for an existing IDE".
Execute the downloaded installer.
Execute this program with administrator rights: SDK Manager.exe
Download the proposed SDK (if you get errors regarding the SDK Manager couldn't create some folders, remember it should be executed as administrator).
Configure Android Studio to work with the new SDK
Open Android Studio and in the Quick Start window click "Configure", you will see the SDK Manager greyed out.
Go to "Project Defaults", then to "Project Structure" and there it will ask for the path where you installed the SDK.
If you click OK and go back you will see the SDK Manager is no longer greyed out, and now you can start creating projects.
A project needs to have been loaded at least once for the link to become available.
Found it in :
File / Project Structure...
Then in "Android SDK" provide the path to the SDK folder inside the Android Studio Application Bundle.
Then Make a new project.
Then after the initial setup the elements where finally enabled.
Android Studio Beta v0.8.14 with the Android SDK for Mac does not appear to include the SDK: you need to install the SDK manually (e.g. https://developer.android.com/sdk/installing/index.html?pkg=tools) and then configure Android Studio to find and use it.
(I ended up using the ADT bundle, since I couldn't seem to find the SDK as a standalone download.)
You need to use the buttons on the welcome dialog, and not on the applications menu bar or preferences (as I had initially thought). Step by step:
(Note that "SDK Manager" is greyed out until you complete this, at which point you cannot undo it for the purposes of taking screenshots...)
Navigate back and the "SDK Manager" button on the "Configure" panel should be enabled. Clicking it should display something like this:
I had a similar problem and the cause was that I've used path with a space in it. There was a warning in the window that can cause problems with NDK, but in fact it caused problems with Android Studio internal SDK as well. After changing the path it works fine.
Go to configure -> project defaults -> project structure
give the path for the SDK and press OK.
It should work now
For Mac Users (Android Studio Beta v0.8.14)
The SDK or SDK manager is not included with this version of Android Studio, and the documentation is obfuscated regarding this change at this point.
Download the standalone SDK from here. You may select the latest revision of the same from this link below the title GET THE SDK FOR AN EXISTING IDE.
Extract the downloaded zip, and rename the folder as sdk
Copy the sdk folder into the Android Studio.app/Contents directory
Restart Android Studio and you will be shown this dialog when the Android Studio starts up
To remove grey out area,
you need to follow this steps as below:
Go to File
Click on Project Structure
Go to SDK Location
Click on Browse to find SDK path
Select proper SDK path on your system
Now click on SDK manager icon on Android Studio toolbar
I hope this solves the problem of grey out area.
Thanks,
This will no longer be a problem when version 1.0 is released. In the meanwhile you can download the latest canary build (1.0 RC2), which downloads the SDK during the setup.
For me, the issue was on windows and it was as simple as launching the installer with "administrative" mode. That's it!

"SDK Platform Tools component is missing!"

I am trying to add the add SDK Platform 1.6 to an existing Install of 2.2, with the help of this thread.
As suggested, I ran Help → Check for Updates which found and installed the following:
+ Android DDMS 8.0.1.v201012062107-82219
+ Android Development Tools 8.0.1.v201012062107-82219
It prompted for restarting Eclipse and when it restarted it gave me the following error message:
"SDK Platform Tools component is missing!
Please use the SDK Manager to install it."
Huh? Why? I still have the SDK Platform Tools on C:\android-sdk-windows that was working perfectly before I did this "upgrade".
What do I need to have both 2.2 and 1.6 supported in my development environment?
OK, here is what I did to fix the problem:
Open Eclipse. Then:
Window > Android SDK and AVD Manager
> Available Packages:
> Android Repository:
+ Android SDK Tools, revision 8
+ Android SDK Platform-tools, revision 1
[Install Selected]
The downloaded sdk software does not contain sdk platform tools.
For this, using cmd go to "C:\Program Files\Android\android-sdk\tools" directory and then type the following command to download those missing tools:
android.bat update sdk --no-ui
Then type y to accept all the licenses in cmd. Downloading will start in cmd itself.
Installing Android SDKs is done via the "Android SDK and AVD Manager"... there's a shortcut on Eclipse's "Window" menu, or you can run the .exe from the root of your existing Android SDK installation.
Yes I think installing the 2.3 SDK will fix your problem... you can install older SDKs at the same time. The important thing is that the structure of the SDK changed in 2.3 with some tools (such as ADB) moving from sdkroot\tools to sdkroot\platform-tools. Quite possibly the very latest ADT plugin isn't massively backwards-compatible re that change.
I don't understand why the files were relocated to /platform-tools from /tools.
It seems ALL development tools I have tried, appcelerator for one, have their setup software look for these files in /tools and fail setup. The "work around" involves a few different bits of trickery wherein you either...1) set up a soft link to tell the operating system "if you look for file "x" here it is really over here. or 2) simpler method ... make a copy of all the /platform-tools default (pre-additional android sdk installations) files and place them into the /tools folder. this circumvents the relocation that the newer sdk have done.
Then of course YOU MUST SET PATH ENVIRONMENT VARIABLES TO POINT TO THE SDK LOCATION (sometimes to the Android-sdk-[operating system name:Android-sdk-windows or Android-sdk-mac_x86 ect. ] and to the /platform-tools and sometimes to /tools.
it is a trial and error pain. But when it finally is working ...it works.
Before update SDK components, check in Android SDK Manager → Tools → Options and set HTTP proxy and port if it is set in local LAN.
The latest version of the Android SDK ships with two different applications: an SDK Manager and an AVD Manager rather than one single app that was valid when this question was originally asked.
My particular problem was unrelated to the other suggestions. I'm on a network at the moment where HTTPS traffic is mostly disallowed. In order to install the Android Platform Tools I needed to turn on the option to "Force https://... sources to be fetched using http://..." and then this allowed me to install the other tools.
Here is another alternative. Download it directly here: http://androidsdkoffline.blogspot.com.ng/p/android-sdk-tools.html.
The present version as of this writing is Android SDK Tools 25.1.7. Unzip it when the download is done and place it in your sdk folder. You can then download other missing files directly from the SDK Manager.
I have been faced with a similar problem with SDK 24.0.2, and ADT 23.0, on windows 7 and Eclipse Luna (4.4.0). The android SDK Manager comes with default Proxy IP of 127.0.0.1 (localhost) and port 8081. So as you try to run the SDK Managers as advised by earlier solutions, it will try to connect through the default proxy settings, which keep on failing(...at least on my system). Therefore, if you do not need proxy settings, simply clear default proxy settings (i.e. remove proxy server IP and Port, leaving the fields empty). Otherwise set them as necessary. To access these settings in eclipse, go Window-> Android SDK Manager->Tools->Options.
Hope this helps someone.
step 1:
click on the blue icon on taskbar. It is "SDK MANAGER". Then next click on the Appearance & Behaviour -> System Settings -> Android Sdk
step2:
select on "Android SDK location" and choose edit option.It will prompt you update/install the components. Then start the download or update and this may take a while , all you have to do is wait patiently. "In case you have previously installed the sdk it will show that the sdk android sdk is installed"
step3:
once this is done the program will compile fine ,and no error will exist whatsoever.
Thanks Udit Sood
android.bat update sdk --no-ui not worked on windows 10 powershell but
.\android.bat update sdk --no-ui worked

Categories

Resources