Android Studio - SDK Manager - android

When I type 'android' at my command prompt I have the following message 'The "android" command is no longer available. For manual SDK and AVD management, please use Android Studio. For command-line tools, use tools\bin\sdkmanager.bat and tools\bin\avdmanager.bat'.
What do I do?

The standalone GUI based SDK manager (and AVD manager) is now gone!
You either have to use the standalone command at <SDK_ROOT>\tools\bin\sdkmanager or
the inbuilt GUI SDK manager within the Android Studio found at: Tools>Android > SDK Manager

Not sure what has caused this but there is a workaround you just need to download and replace the tools folder in your Android SDK with an earlier version and it will work again.
Follow these steps:
Click the link below for your OS and download a new Android SDK tools folder:
(Mac) https://dl.google.com/android/repository/tools_r25.2.3-macosx.zip
(Windows) https://dl.google.com/android/repository/tools_r25.2.3-windows.zip
Goto your Android SDK folder (on Mac its: /Users/username/Library/Android/sdk) then find the folder named "tools" and delete it
Unzip and copy the tools folder you downloaded from the link to your Android SDK folder
That's it.. You should now be able to run the android command from the terminal again

I had to navigate to and run the following
cd /Users/<username>/Library/Android/sdk
tools/bin/sdkmanager --licenses

Related

Unable to setup Android SDK on macOS Catalina?

While installing Android studio, I got no path for Android sdk says "android sdk is missing" and it pointed to default path /Users/{username}/Library..
When I go physically to the location, cannot locate sdk.
It's my corp device and I cannot setup android studio.
Tried downloading command line tools from below:
https://developer.android.com/studio?pkg=tools
but not sure how sdk folder looks like. Need guidance
NOTE: I have ksh (.kshrc) file on my device.
If You are looking for installing only android SDK. You can follow any of the methods below.
Install the Android studio (Manually)
download without android SDK Android Studio bundled zip folder and install the same from here - https://developer.android.com/studio#downloads
User Homebrew and install android sdk - Easiest and preferred option!!!
you can use Homebrew to install the Android SDK.
Install Homebrew from here (just follow the commands via MAC Terminal) - https://brew.sh/
Once you have installed HomeBrew run the following commands:
More details here - https://formulae.brew.sh/cask/android-sdk#default
brew tap homebrew/cask
brew install --cask android-sdk
This will install the Android SDK tools in
/usr/local/Cellar/android-sdk/<version number>
Use this path to update your SDK path in android studio as shown in the post above. Hope this helps.
Go to File -> Project Structure and check the Android SDK Location:
Then Android Studio -> Preferences -> System Settings -> Android SDK (just type sdk in the search bar).
Download SDK Platforms and SDK Tools:

Opening Android SDK manager on mac

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.

Can't find SDK Manager.exe in Android SDK folder

I need to install some packages in Android SDK Manager, but in my SDK folder there isn't the .exe file (There is only the AVD Manager and the folders).
How can I find it? My SDK works normally with Android Studio, without problems, it's strange that SDK Manager.exe isn't there.
I had to install an older version
https://dl.google.com/android/installer_r24.4.1-windows.exe
and update it. Going from there worked
To open the SDK Manager from Android Studio, click Tools > Android > SDK Manager or click SDK Manager in the toolbar. If you're not using Android Studio, you can download tools using the sdkmanager command-line tool.
Check this link: https://developer.android.com/studio/intro/update.html#sdk-manager
I found C:\NVPACK\android-sdk-windows\tools\android.bat
When I ran it, it brought up SDK Manager.
Which was nice, because I couldn't find SDK Manager in the C:\NVPACK\android-sdk-windows\lib folder like I was told it would be there.
You can find Android SDK Manager.exe file in the following folder:
C:\Users[account]\AppData\Local\Android\sdk (sdk1 in my case)
You can tap on that and you will get the Android SDK Manager screen.
Go to android_sdk/tools/bin/ open cmd and type sdkmanager and hit enter you can use command prompt for it
You can find sdk manager under command-line tools, which you will have to download by clicking the configure drop-down link under the android studio start-up wizard.
C:\Users[account]\AppData\Local\Android\sdk\cmdline-tools\latest\bin
C:\Users[account]\AppData\Local\Android\sdk\cmdline-tools\latest\bin
I had trouble running from here because I didn't have the right permission. I was trying to update my SDK. I got it running from another folder on my system with the command line command:
"C:/Program Files (x86)/Android/android-sdk/cmdline-tools/7.0/bin/sdkmanager.bat" --update --sdk_root="C:/Program Files (x86)/Android/android-sdk/cmdline-tools"
On Visual Studio 2022 you can look under Tools/Android/Android SDK Manager

Android Studio doesn't start up, saying SDK components were not installed

I have download Android Studio packed with the full SDK (build-tools, platforms, everything). Installed the studio (64-bit) on Drive C and the SDK in "AppData/local/Android/android-sdk" folder as specified by the installer itself.
Now when I run the Studio (with admin permissions) it still attempts to download everything, as if no SDK components were present on my PC.
Is there a way to tell the Studio where the SDK is? Or I have to re-download it all?? (I already have everything mentioned in the error message)
"The following SDK components were not installed: platform-tools, extra-android-m2repository, tools, addon-google_apis-google-21, build-tools-21.1.2, android-21, sys-img-x86-addon-google_apis-google-21, source-21,"
[The following SDK component was not installed: platform-tools]
I ran into the same issue and was able to solve it by updating the SDK from the command line.
Go to the location where your Android SDK was installed (possibly ~/Android/Sdk) and run:
./android update sdk --no-ui
There's no need to run it as root.
Then, on Android Studio, go on Configure -> Project Defaults -> Project Structure, and then point Android SDK Location to wherever it is located.
step1: just copy 21.1.2 folder and paste with name 21.1.1
step2 : open 21.1.1 folder and open "source properties" file with any text editor( notepad)
step3 : change pkg.Revision=21.1.1 save it
step 4: android studio
sudo chown -R <username> .android
as mentioned here, android sdk updater stores a copy of some xmls in .android/cache
So after you have set the permissions, the updater can store necessary xmls and download missing sdk components

How to determine the version of android SDK installed in computer?

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.

Categories

Resources