- How to install Android SDK on Ubuntu?
- 9 Answers 9
- How to install Android Studio on Ubuntu 22.04
- Method 1: Using android-studio repository
- Step 1: Install JDK
- Step 2: Verify installation
- Step 3: Add android-studio repository
- Step 4: Update system
- Step 5: Install the app
- Method 2: Using Snap
- Step 1: Install Snap
- Step 2: Install JDK
- Step 3: Install Android Studio
- How to uninstall Android Studio
- Conclusion
- About the author
- Naima Aftab
- install android sdk using command line linux
How to install Android SDK on Ubuntu?
For my Ubuntu machine, I downloaded the latest version of Android SDK from this page. After extracting the downloaded .tgz file, I was trying to search for installation instructions and found:
To get started on Linux: Unpack the .zip file you’ve downloaded. The SDK files are download separately to a user-specified directory. Make a note of the name and location of the SDK directory on your system—you will need to refer to the SDK directory later when using the SDK tools from the command line.
there’s an easy install paolorotolo.github.io/android-studio — or check this tutorial on how do it manualy — youtube.com/watch?v=qfinKxwYYZs
@Tasos Any idea about the maintenance and long term support paolorotolo’s Android studio? This looks more of a personal project 🙁
Android Studio itself alerts you when there is a new update/upgrade so you do it from there. I dont think the person modified AS
from my last comment — however you can ask that question directly to the person here — github.com/PaoloRotolo/android-studio/issues
9 Answers 9
sudo apt update && sudo apt install android-sdk
The location of Android SDK on Linux can be any of the following:
- /home/AccountName/Android/Sdk
- /usr/lib/android-sdk
- /Library/Android/sdk/
- /Users/[USER]/Library/Android/sdk
- Download the Android Studio.
- Extract downloaded .zip file. The extracted folder name will read somewhat like android-studio
To keep navigation easy, move this folder to Home directory.
- After moving, copy the moved folder by right clicking it. This action will place folder’s location to clipboard.
- Use Ctrl Alt T to open a terminal
- Go to this folder’s directory using cd /home/(USER NAME)/android-studio/bin/
- Type this command to make studio.sh executable: chmod +x studio.sh
- Type ./studio.sh
A pop up will be shown asking for installation settings. In my particular case, it is a fresh install so I’ll go with selecting I do not have a previous version of Studio or I do not want to import my settings.
If you choose to import settings anyway, you may need to close any old project which is opened in order to get a working Android SDK.
From now onwards, setup wizard will guide you.
Android Studio can work with both Open JDK and Oracle’s JDK (recommended). Incase, Open JDK is installed the wizard will recommend installing Oracle Java JDK because some UI and performance issues are reported while using OpenJDK.
The downside with Oracle’s JDK is that it won’t update with the rest of your system like OpenJDK will.
The wizard may also prompt about the input problems with IDEA .
Verify installation settings
An emulator can also be configured as needed.
The wizard will start downloading the necessary SDK tools
The wizard may also show an error about Linux 32 Bit Libraries, which can be solved by using the below command:
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1
After this, all the required components will be downloaded and installed automatically.
After everything is upto the mark, just click finish
To make a Desktop icon, go to ‘Configure’ and then click ‘Create Desktop Entry’
How to install Android Studio on Ubuntu 22.04
Android studio is one of the many tools available that are used for android development. This is a cross-platform tool that works on many operating systems and has numerous built-in features and comes with multiple layouts for generating eye catchy GUI. These features were one reason why this tool replaced the formerly popular tool Eclipse IDE.
You can install Android Studio on Ubuntu 22.04 using two methods which are either using android-studio repository or Snap. Both of these methods have been discussed here in detail.
Method 1: Using android-studio repository
Follow the steps given below to learn how this method can be used to install Android Studio on Ubuntu 22.04. This method makes use of the PPA repository to proceed with the installation procedure.
Step 1: Install JDK
If you do not have JDK installed on your system then use the below-given command to install it on Ubuntu 22.04.
Output
While processing you will be asked whether you want to continue or not. Press ‘Y’ to continue the installation procedure.
Step 2: Verify installation
Now validate if the app was successfully installed.
The installation has been verified.
Step 3: Add android-studio repository
Now that JDK has been installed you have to import the android-studio repository by running the command provided below.
Step 4: Update system
Now update your system before you move towards installing the Android Studio.
Output
Step 5: Install the app
After updating the system, you can now easily install the app.
Output
Now you simply have to search for the app in the menu and once you find it, you can click on it to use the app.
Android Studio has been installed.
Method 2: Using Snap
Here we have elaborated how you can use Snap store to install Android Studio.
Step 1: Install Snap
Snap is by default installed on Ubuntu 22.04, however, if it is not installed, use the below-given command.
Step 2: Install JDK
You have to install JDK on your system before installing Android Studio as indicated in the previous method.
Step 3: Install Android Studio
Lastly, use the command provided below to install Android Studio.
The app has been installed.
How to uninstall Android Studio
If you wish to uninstall Android Studio using Snap then follow the command given below:
Output
Android Studio is removed or uninstalled successfully.
Conclusion
You can install Android Studio on Ubuntu 22.04 using either the android-studio repository or Snap. In both cases you need to install JDK first which can be done using the command $ sudo apt install openjdk-11-jdk. Each method has a certain set of steps that need to be followed and these have been discussed in detail along with visual representations.
About the author
Naima Aftab
I am a software engineering professional with a profound interest in writing. I am pursuing technical writing as my full-time career and sharing my knowledge through my words.
install android sdk using command line linux
I want to download android sdk through command line. I got this command from command https://stackoverflow.com/a/4569792/563306 I downloaded Android SDK r18 tar file. extracted it and in tools directory, I tried this command
Error: Flag '--no-ui' is not valid for 'update sdk'.
android --help update sdk Usage: android [global options] action [action options] Global options: -v --verbose Verbose mode: errors, warnings and informational messages are printed. -h --help Help on a specific command. -s --silent Silent mode: only errors are printed out. Valid actions are composed of a verb and an optional direct object: - list : Lists existing targets or virtual devices. - list avd : Lists existing Android Virtual Devices. - list target : Lists existing targets. - create avd : Creates a new Android Virtual Device. - move avd : Moves or renames an Android Virtual Device. - delete avd : Deletes an Android Virtual Device. - update avd : Updates an Android Virtual Device to match the folders of a new SDK. - create project : Creates a new Android Project. - update project : Updates an Android Project (must have an AndroidManifest.xml). - create test-project: Creates a new Android Test Project. - update test-project: Updates an Android Test Project (must have an AndroidManifest.xml). - create lib-project : Creates a new Android Library Project. - update lib-project : Updates an Android Library Project (must have an AndroidManifest.xml). - update adb : Updates adb to support the USB devices declared in the SDK add-ons. - update sdk : Updates the SDK by suggesting new platforms to install if available. Action "list ": Lists existing targets or virtual devices. Options: No options Action "list avd": Lists existing Android Virtual Devices. Options: No options Action "list target": Lists existing targets. Options: No options Action "create avd": Creates a new Android Virtual Device. Options: -c --sdcard Path to a shared SD card image, or size of a new sdcard for the new AVD -t --target Target id of the new AVD [required] -n --name Name of the new AVD [required] -p --path Location path of the directory where the new AVD will be created -f --force Force creation (override an existing AVD) -s --skin Skin of the new AVD Action "move avd": Moves or renames an Android Virtual Device. Options: -p --path New location path of the directory where to move the AVD -n --name Name of the AVD to move or rename [required] -r --rename New name of the AVD to rename Action "delete avd": Deletes an Android Virtual Device. Options: -n --name Name of the AVD to delete [required] Action "update avd": Updates an Android Virtual Device to match the folders of a new SDK. Options: -n --name Name of the AVD to update [required] Action "create project": Creates a new Android Project. Options: -n --name Project name -t --target Target id of the new project [required] -p --path Location path of new project [required] -k --package Package name [required] -a --activity Activity name [required] Action "update project": Updates an Android Project (must have an AndroidManifest.xml). Options: -p --path Location path of the project [required] -l --library Location path of an Android Library to add, relative to the main project -n --name Project name -t --target Target id to set for the project -s --subprojects Also update any projects in sub-folders, such as test projects. Action "create test-project": Creates a new Android Test Project. Options: -p --path Location path of new project [required] -m --main Location path of the project to test, relative to the new project [required] -n --name Project name Action "update test-project": Updates an Android Test Project (must have an AndroidManifest.xml). Options: -m --main Location path of the project to test, relative to the new project [required] -p --path Location path of the project [required] Action "create lib-project": Creates a new Android Library Project. Options: -n --name Project name -p --path Location path of new project [required] -t --target Target id of the new project [required] -k --package Package name [required] Action "update lib-project": Updates an Android Library Project (must have an AndroidManifest.xml). Options: -p --path Location path of the project [required] -l --library Location path of an Android Library to add, relative to the main project -t --target Target id to set for the project Action "update adb": Updates adb to support the USB devices declared in the SDK add-ons. Options: No options Action "update sdk": Updates the SDK by suggesting new platforms to install if available. Options: No options