"SDK Platform Tools component is missing!" - android

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

Related

How do I install the standalone Android SDK and then add it to IntelliJ IDEA on Windows?

This is the webpage showing from where I downloaded the SDK:
On extracting the .zip folder, and opening the 'tools' folder, all I can see in an emulator.exe, mksdcard.exe and a host of .bat files (as shown below).
How do I proceed?
In IntelliJ IDEA 2017.1 and 2017.2 setting up Android SDK from scratch is complicated. I would recommended to install Android Studio and manage SDK platform there. This problem will be addressed in one of the nearest updates.
If you are brave enough, it's still possible to set it up without Android Studio using the tools\bin\sdkmanager.bat command line tool. GUI version of the SDK Manager is deprecated (no longer available in the SDK download). Standalone SDK can be downloaded here. Look below the Get just the command line tools section.
So, you will need to install at least one platform version.
First run the update to ensure you have the latest tools:
sdkmanager --update
Now you can list the packages available for installation:
sdkmanager --list
To install Android Platform: (Edit April 2022: need quotes now)
sdkmanager "platforms;android-26"
To install the current build tools version (optional):
sdkmanager "build-tools;26.0.0"
At this point you should be able to add Android SDK configuration for the installed platform version in IntelliJ IDEA like this:
You will also have access to Android SDK configuration UI where you download additional components and perform updates (just like in Android Studio):
As Karan Sharma mentioned in this post.
To add an existing SDK, you should close your project if you have any open one.
Then from the Welcome page select Configure -> Project Defaults -> Project Structure
And then from the Default Project Structure window and from the left side, select SDKs and then the plus button from the toolbar, and from the menu select Android SDK
And then give the address to the location where your Android SDK files are in, and hit OK.
Thats it!
Now it should be working for you!
You can also install the SDK in the IDEA GUI. It says in the tutorial,
If you don't have the Android SDK configured, IntelliJ IDEA will
detect this and prompt you to download it:
launch android executable and install the platforms and build-tools.

Cannot find a compatible Android SDK for compilation when running `tns platform add android`

I am following an official NativeScript tutorial and having a problem configuring my OS X environment for android development.
When running tns platform add android I receive the following error:
Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 21 or later.
The tns doctor command also returns warnings on android-sdk issues:
Cannot find a compatible Android SDK for compilation. To be able to
build for Android, install Android SDK 21 or later. Run $ android to
manage your Android SDK versions. You need to have the Android SDK
Build-tools installed on your system. You have to install version 22.
Run "android" from your command-line to install required Android Build
Tools. You need to have the latest Android Support Repository
installed on your system. Run $ android to manage the Android
Support Repository.
My android-sdk installation looks like this:
My .bash_profile also includes the followings:
export ANDROID_HOME="/usr/local/Cellar/android-sdk/24.3.4/"
export PATH="$PATH:~/npm-global/bin:/usr/local/Cellar/android-sdk/24.3.4/tools:/usr/local/Cellar/android-sdk/24.3.4/platform-tools"
Should I go further and try setting system-wide environment variables - not just for the .bash_profile? Also, it is possible that I missed something from the setup process...
Any tip on how I could debug this situation (commands, config files etc.) would be great, thank you!
Alright, so you need to make sure of following:
Make sure you have API 22 installed.
Make sure you you have Android SDK Build Tools 22.x.x installed. (Yes,
specifically 22.x.x)
Make sure you have Android support repository installed. (You can
find it under Extras section in Android SDK Manager)
Once you have performed steps mentioned above, run tns doctor again and you should see No issues were detected message.
This is because of sudo. The root user has no ANDROID_HOME set.
For Windows User:
Run 'android update sdk' from command line
Select Android 5.1.1(API22)
Select Tools folder
Select Extras and click on Install.
ps:- adding this answer, so that if any one land on this page can see it.
Check the ANDROID_HOME is ok
Install the API 22 + ion the Extras > Android Support Repository
Run the following
tns platform remove android
tns platform add android#next
Run
tns run android
then it should be OK
I solve this problem installing Android Support Repository from Extras.
updating SDK in AndroidStudio >> Preferenceswould help
on my windows 10 machine I had to open file explorer right click on this pc and go to properties on the left hand side I had to go to advanced settings. At the bottom I click environment variables then on the android_home variable I clicked edit then pointed it to this path on my machine where the sdk was installed
C:\Program Files (x86)\Android\android-sdk
This answer is on a Linux, not OSX, platform. However, since this is the SO that appears most often for the listed error, I'll share a recent fix that worked for me.
If you have done all of the above and are still getting the error, try this solution.
I am using NativeScript 8.0.2.
You will know that ANDROID_HOME and Java are configured correctly if you can run the command $ANDROID_HOME/tools/bin/sdkmanager --list. If that fails, then first check that your Java is compatible (I had to add OpenJDK 8 and change my PATH with export JAVA_HOME="/usr/lib64/jvm/java-1.8.0/")
In Android Studio, add a previous build tool version. Go to your SDK Manager > SDK Tools, tick the bottom box "Show package details", and add a previous version. In my case, 31.0.0 was the latest, and I added 30.0.3. Now run ns doctor android again and everything should pass.
Seems 31.0.0 is not yet properly recognised by Native Script.
I always got the error "✖ Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 28 or later. "
I actually had to go to the android studio settings and install the exact SDK 28 before this error went away.
Android Settings Pic
This is an updated answer, I also had the same issue:
Like all the previous pictures above, I had to install the SDK platforms, using the SDK Manager. From the main screen of Android Studio, click More Actions and choose SDK Manager. Before that I had to add the platform-tools to my PATH in Windows
%LOCALAPPDATA%\Android\Sdk\platform-tools
That fixed my issue and the docs for setup are here.

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.

Can't find AVD or SDK manager in Eclipse

Seems like I'm having some problems after updating my android sdk tools and platform-tools using the sdk manager. The problem is that, after updating, I found that the avd or sdk options in the windows dropdown menu in eclipse are gone! And, I can't find any option to create an android project from file->new projects any more.
I tried removing the ADT from eclipse and the software site "https://dl-ssl.google.com/android/eclipse/" from "available software sites" and then reinstalled the ADT from "https://dl-ssl.google.com/android/eclipse/" using help->install new software. The installation was successful, but I still don't have any option for shortcuts to the SDK manager or the AVD in eclipse, and neither can I create a new android project.
By the way, the android perspectives are not gone, they are still here. Also, I can manually open the avd and sdk manager from the directory where I have installed them.
Can anyone please show me a workaround? Any help would be greatly appreciated.
I have solved this as follows:
Window > Customize Perspective... (you will see Android and AVD Manager are disabled)
Command Groups Availability > Android and AVD Manager > check
Tool Bar Visibility > Android and AVD Manager > check
I had similar problem after updating SDK from r20 to r21, but all I missed was the SDK/AVD Manager and running into this post while searching for the answer.
I managed to solve it by going to Window -> Customize Perspective, and under Command Groups Availability tab check the Android SDK and AVD Manager (not sure why it became unchecked because it was there before). I'm using Mac by the way, in case the menu option looks different.
Well I feel silly, but my problem was that I was in the Debug perspective and they do not show up in that perspective. Switched back to the Java perspective and viola.
Window -> Custom Perspective -> Command Groups Availability -> Android SDK and AVD Manager check it
Chances are that you may be running your eclipse using Java 1.5.
Latest Plugin requires that the JRE be 1.6 or higher.
You will have to use Eclipse that runs on JRE 1.6
Edit: I had run into same problems. If it is not JRE problem then you can debug this. Follow below procedure:
Window -> show View -> other -> Plugin Development -> Plugin Registry
In the plugin registry search for com.android.ide.eclipse.adt or any other plugin related to android (depending on your installation there maybe 7-8)
Select , Right Click -> Diagnose. This will show the problem why the plugin was not loaded
Try to reinstall ADT plugin on Eclipse. Check out this:
Installing the Eclipse Plugin
I would suggest you to install the ADT plugin compatable with your Android SDK tools and try to install all the required plugins compatable with your Android SDK
LIKE
Android SDK tools Rev 20.0.3
Android SDK tools Rev 20.0.3
Android SDK Platform-tools Rev 14
Android 2.3.3(API 10) sdk platform rev 2
samples for sdk api 10 rev 1
ADT Plugin 20.0.3
Unfortunately I ended up having to re-install eclipse. but first (In Linux)(not sure of folder in Windows) do:
sudo rm -R /usr/share/eclipse/

Android SDK Manager and AVD Manager doesn't have the correct information and fails to update on Ubuntu

I'm trying to install Android SDK on Ubuntu but fail when I try to use the SDK Manager and AVD Manager to install Android platforms.
I've downloaded: android-sdk_r04-linux_86.tgz
The I start the SDK Manager and AVD Manager (UI) according to the README file:
./tools/android
And I get the following
Installed Packages:
- Install SDK Tools, revision 4
Available Packages:
- https://dl-ssl.google.com/android/repoisotry/repository.xml
- This repository requires a more recent version of the Tools. Please update-
- Android SDK Tools, revision 4
- Archive for Linux
(comment: funny since rev 4 seems to be what's installed this is what seems to be installed)
Now doing an update of the Android SDK Tools, revision 4 or everything results in
99% progress and then the application hangs.
Here's the console feedback:
johanc#johan-desktop:~/android/android-sdk-linux_86$ tools/android
Starting Android SDK and AVD Manager
No command line parameters provided, launching UI.
See 'android --help' for operations from the command line.
Error: null
In the app I choose to upgate the following package:
Package Description
Android SDK Tools, revision 4
Archive Description
Archive for Linux
Size: 15 MiB
SHA1: 99380c9330c1c3728c836206947350cc00fa28c2
Site
https://dl-ssl.google.com/android/repository/repository.xml
The console output reads (and the app hangs at 99%):
Exception in thread "Installing Archives" java.lang.AssertionError
at com.android.sdkuilib.internal.tasks.ProgressTask.incProgress(ProgressTask.java:97)
at com.android.sdkuilib.internal.repository.UpdaterData$2.run(UpdaterData.java:358)
at com.android.sdkuilib.internal.tasks.ProgressTask$1.run(ProgressTask.java:135)
I went to Eclipse's "help > check for updates" menu and blindly accepted all the updates :). Did a restart of the app and everything was cool.
What version if Java are you running?
Some earlier versions ofJava 1.5 were lacking a proper XML validator, and made the XML validation fail in the SDK Manager (we didn't properly checked that a validator were present).
Unfortunately once the validation fails, it reverts to the wrong code path and behaves as if you have an older version of the tools.
We are fixing this for the next version of the SDK Manager, but in the mean time you can try to update your version of Java.
1) Open SDK and AVD manager - for that Give command tools/android
2) Go in to the settings
3) Make TRUE the option "Force to be fetched using http"
4) Then go to install package and update the package
I figure out that I didn't see the Settings option on the left column because I was launching the SDK Manager from within Eclipse, like the directions say. When I launched it from the executable where I installed it, it comes up with more options, Settings being one of them. I first thought I needed to force https to use http, but what I really needed to do was enter my proxy settings, which is also one of the Settings options. Hope this helps.
Downgrading to previous version of the SDK got this working for me. I experienced the same problems on mac 10.5 with the latest Android sdk (r04-mac) and could not find any other way to resolve the issue.
Previous versions are available in the SDK Archives.
When I got this error on Mac osx, it was because I was already using the most up-to-date set of tools. Not sure why it didn't recognize this, but when I unchecked "Display Updates Only" it showed that the available package was version 5, which matched the version listed in Installed Packages.
I was having this problem as well. I looked at which version of java my Karmic Ubuntu was running and the link it pointed to was gij-4.4 (GNU interpreter for Java) (I had to do a little tracing of links)
I switched /usr/bin/java to point to /usr/lib/jvm/java-6-sun/bin/java and all is now well.
rm /usr/bin/java
ln -s /usr/lib/jvm/java-6-sun/bin/java /usr/bin/java

Categories

Resources