How to determine the version of Android SDK installed in my computer?
<Program files>\Android\Android-sdk\platforms\<platform SDK's>
On a 32bit machine:
"<Program files>" will be \Program Files\
On a 64bit machine:
If you installed the 32bit ADT, "<Program files>" will be \Program Files (x86)\
If you installed the 64bit ADT, "<Program files>" will be \Program Files\
Type in android list target into your command line to see what android API you are using.
C:\ <path to android sdk> \tools\source.properties (open with notepad)
There you will find it.
Android Studio is now (early 2015) out of beta. If you're using it as your development platform, the SDK Manager is probably the easiest way to see what's available. To start the SDK Manager from within Android Studio, use the menu bar: Tools > Android > SDK Manager.
This will provide not only the SDK version, but the versions of SDK Build Tools and SDK Platform Tools. It also works if you've installed them somewhere other than in Program Files.
You can check following path for Windows 10
C:\Users{user-name}\AppData\Local\Android\sdk\platforms
Also, you can check from android studio
File > Project Structure > SDK Location > Android SDK Location
open android sdk->click on tools tab->about and u get the entire details!
In the case of Linux, You get the version of Android SDK using sdkmanager.
your_path/android-sdk/tools/bin/sdkmanager --version
in my case
/var/lib/jenkins/android-sdk/tools/bin/sdkmanager --version
While some responses have shown how to get the versions of the installed Android SDKs and various Android SDK related tools using the Android SDK Manager GUI, here's a way to get the same information from the command line:
%ANDROID_HOME%\tools\bin\sdkmanager.bat --list
You can redirect the output to a file to ease review and sharing.
Note: In my corporate environment, I also had to use the --proxy, --proxy_host, and --proxy_port command line options. You may need to use them as well.
I develope cross-plateform mobile applications Using Xamarin integrated in Visual Studio 2017.
I prefer to install and check all details of Android SDK from within the Visual Studio 2017. This can be found under the menu TOOLS -> Android -> Android SDK Manager.
Bellow is the Visual representation of the Adroid SDK Manager.
If you prefer to manage from UI, type android in command windows which will open the Android SDK Manager. Or you can directly open from C:\Program Files (x86)\Android\android-sdk\SDK Manager.exe
Create a Batch file (.bat) in Windows with the following command in it:
%ANDROID_HOME%\tools\bin\sdkmanager.bat --list && pause
NOTE: Using && pause is necessary to be able to review the information, once it is listed. If not used, the batch file will simply run, show the information in just mere few seconds and exit right away.
Related
After updating Android Studio to 2.0 l am getting this error unable to obtain debug bridge and Android Device Monitor does not open. Anyone faced this error before?
I just open sdk manager and installed all android sdk tools and done.
Check whether you need to install "Android Sdk Platform Tools" in the Android SDK Manager.
Somehow, after installing Android Studio from the bundle (for Linux) I lacked the "platform-tools" directory in "Android/Sdk", where the adb executable resides. Installing the platform tools helped. It was easier to find in the standalone sdk manager.
This is because you deleted the adb.exe (it might be your antivirus who deleted it),that resided in the platform tools in the android sdk folder.
What you need to do is to delete the current platform-tools in the sdk manager program and re install it all over again.
I installed the right sdk version that matched my virtual device android version
I am also running the same problem when update android studio from 1.4 to 1.5 stable version. When I run adb command from terminal then i found following error :
bash: ./adb: cannot execute binary file: Exec format error
After R&d I found that this error occurs due to unsupported architecture. In my case:
I am using ubuntu14.04 LTS 32-bit. I observed that after updation, lib folder under platform-tools converted to lib64. I think above error occurs due to 32-bit architecture because after updation 32-bit support removed.
For permanent solution upgrade you system to 64-bit architecture.
Quick solution is to replace the updated platform-tools folder with old one that containing the lib folder instead of lib64.
I think 32-bit architecture support for android development stopped by google for future releases. But I am not sure.
I am phase these error when updating Android-SDK Plateform-Tools 23.1 in Android SDK Manager
i am worked on ubuntu 14.04 [32bit] that is not supporting with Plateform-Tools 23.1 it is only supporting in 64bit Operating System architecture that's why downgrade my Plateform-tools 23.0
it works perfect...!!!
Go to: Android Studio Settings > Appearance & Behavior > System Settings > Android SDK:
If path for SDK are text in red, change to your SDK folder and click ***APPLY***
Open the standalone SDK manager and install the platform tools package.
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.
Trying to open the android SDK manager on mac, but when I get to the terminal window and go to direct to tools like it says, I don't know what to do.
These are the instructions per the site
Mac/Linux: Open a terminal and navigate to the tools/ directory in the location where the Android SDK was installed, then execute android sdk.
And it's in my downloads. What do I need to type into the terminal to find it?
For manual SDK, AVD, and project management, please use Android Studio.
Google deprecated the android command.There is a temporary solution that you need to replace it with old one [There are changes in latest android sdk].Using an older version tools is basically a bad idea .
Seems like Google wants workflow to be managed using Android Studio. Perhaps the better solution is to use Android Studio
The SDK manager, as you said, is located in the tools directory of the Android SDK in its installed location. So as per your given information it should be like this:
~/Downloads/Android/sdk/tools/
The filename of the SDK manager is an executable named "android", so cd into the directory and run ./android and you should be good to go.
The "android" command is now deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
As Android Studio 3, the android command is deprecated. So, developers should use Android SDK which has been provided in Android Studio.
Tools > Android > SDK Manager
or for command-line usage,
- on MAC
~/Library/Android/sdk/tools/bin/
on Linux
/Path/To/SDK/tools/bin/
then run sdkmanager.
After updating Android Studio to 2.0 l am getting this error unable to obtain debug bridge and Android Device Monitor does not open. Anyone faced this error before?
I just open sdk manager and installed all android sdk tools and done.
Check whether you need to install "Android Sdk Platform Tools" in the Android SDK Manager.
Somehow, after installing Android Studio from the bundle (for Linux) I lacked the "platform-tools" directory in "Android/Sdk", where the adb executable resides. Installing the platform tools helped. It was easier to find in the standalone sdk manager.
This is because you deleted the adb.exe (it might be your antivirus who deleted it),that resided in the platform tools in the android sdk folder.
What you need to do is to delete the current platform-tools in the sdk manager program and re install it all over again.
I installed the right sdk version that matched my virtual device android version
I am also running the same problem when update android studio from 1.4 to 1.5 stable version. When I run adb command from terminal then i found following error :
bash: ./adb: cannot execute binary file: Exec format error
After R&d I found that this error occurs due to unsupported architecture. In my case:
I am using ubuntu14.04 LTS 32-bit. I observed that after updation, lib folder under platform-tools converted to lib64. I think above error occurs due to 32-bit architecture because after updation 32-bit support removed.
For permanent solution upgrade you system to 64-bit architecture.
Quick solution is to replace the updated platform-tools folder with old one that containing the lib folder instead of lib64.
I think 32-bit architecture support for android development stopped by google for future releases. But I am not sure.
I am phase these error when updating Android-SDK Plateform-Tools 23.1 in Android SDK Manager
i am worked on ubuntu 14.04 [32bit] that is not supporting with Plateform-Tools 23.1 it is only supporting in 64bit Operating System architecture that's why downgrade my Plateform-tools 23.0
it works perfect...!!!
Go to: Android Studio Settings > Appearance & Behavior > System Settings > Android SDK:
If path for SDK are text in red, change to your SDK folder and click ***APPLY***
Open the standalone SDK manager and install the platform tools package.
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.