Android studio linux запуск

Installing Android Studio On Ubuntu 22.04: Complete Guide

Are you new to Android Development? And do you want to learn how to setup your Integrated Development Environment (IDE) for building your projects? Then you are in the right place! Android Studio is the official IDE for developing Android apps. It comes with powerful features that help you build your applications faster and easier. For Linux users, this guide will take you through the nitty gritty of getting your IDE setup. Let’s get started!

System Requirements

  1. x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3.
  2. Any 64-bit Linux distribution that supports Gnome, KDE, or Unity DE; GNU C Library (glibc) 2.31 or later.
  3. A minimum 8 GB of available disk space for your IDE, Android SDK and the Android Emulator.
  4. 8 GB RAM or more.
  5. 1280 x 800 minimum screen resolution.

If your computer meets these requirements then let’s get started with the installations.

Method 1:Manually Installing Android Studio (From the Official & PPA Repositories)

Installing From the Official Repository

You can install Android Studio from the official repository. To begin, open up your terminal and then update and upgrade your APT repository by running the command below:

$ sudo apt update $ sudo apt upgrade 

Then install OpenJDK, a free and open-source implementation of the Java platform, Standard Edition (Java SE). To do so run:

$ sudo apt install openjdk-18-jdk 

Now you can proceed to install your IDE by downloading a zip file of the latest version of Android studio on your machine.

At the time of writing this article, the latest version of Android Studio is the Electric Eel version. Run:

$ wget https://dl.google.com/dl/android/studio/ide-zips/2022.1.1.21/android-studio-2022.1.1.21-linux.tar.gz 

or you can check for the version you want from the Android Studio Download archive

After successful download, you need to unpack the downloaded zip file with:

$ tar -zxvf android-studio-2022.1.1.21-linux.tar.gz 

Then move the android-studio folder to /opt/ using:

$ sudo mv android-studio /opt/ $ sudo ln -sf /opt/android-studio/bin/studio.sh /bin/android-studio 

Once you have run these commands, you will write a snippet of code to allow for the Android Studio application to be available on the application menu shortcut on Ubuntu.

$ sudo nano /usr/share/applications/android-studio.desktop 

Add the following code snippet and save:

[Desktop Entry] Version=1.0 Type=Application Name=Android Studio Comment=Android Studio Exec=bash -i "/opt/android-studio/bin/studio.sh" %f Icon=/opt/android-studio/bin/studio.png Categories=Development;IDE; Terminal=false StartupNotify=true StartupWMClass=jetbrains-android-studio Name[en_GB]=android-studio.desktop 

From there you can open and run your android studio from the activities or on the applications menu.

Читайте также:  Wacom one medium linux

Uninstalling Android Studio — Official Repository

If you installed Android Studio from the Official repository, run the following commands to uninstall the IDE:

$ sudo rm /usr/share/applications/android-studio.desktop $ sudo rm -r /usr/bin/android-studio $ sudo rm -rf /opt/android-studio $ rm -rf ~/android-studio-2022.1.1.21-linux.tar.gz 

This will completely uninstall all the packages that were installed.

Installing Android Studio From the PPA Repository

You can also get your IDE from the PPA repository — an Ubuntu based software repository. To begin install OpenJDK:

$ sudo apt install openjdk-18-jdk 

Check to see the java version installed above:

Then import PPA and update your APT repository using:

$ sudo add-apt-repository ppa:maarten-fonville/android-studio $ sudo apt update 

Once complete, you can install Android Studio through:

$ sudo apt install android-studio -y 

Uninstalling Android studio — PPA repository

If you need to remove Android Studio from your machine, run:

$ sudo apt autoremove android-studio --purge -y 

Then remove the imported PPA using:

$ sudo add-apt-repository --remove ppa:maarten-fonville/android-studio -y 

With this, Android Studio and all the installed packages will have been removed completely

Method 2: Installing Android Studio Using Snap

Another way you can use to install Android Studio is by using Snap — a package management system by Canonical. To do so, first run:

Then install OpenJDK and Android Studio using:

$ sudo apt install openjdk-18-jdk $ sudo snap install android-studio --classic 

Once done, proceed to launch Android Studio by running:

Uninstalling Android Studio — Snap

Removing Android Studio installed using snap is quite easy. You simply need to run:

$ sudo snap remove android-studio 

Method 3: Installing Android Studio Using JetBrains Toolbox

The third method you can use to install Android Studio is by using the Toolbox app which gives you access to developer products made by Jetbrains.

If you don’t know how to install Toolbox, here is a guide on how to.

Once you have Toolbox on your machine, click to open it, then select Android Studio and click install. You will get the latest version of the IDE installed in your machine.

Download Android Studio

If you prefer to install a specific version of Android Studio, you can check the available versions and install the one you prefer.

Android Studio Versions

Uninstalling Android Studio — Jetbrains Toolbox

To remove Android Studio just open the Toolbox App and click the menu button adjacent to Android Studio option to see an uninstall option.

Читайте также:  Find file list linux

This will remove Android Studio and all the packages that were installed with it.

With that, you can select whichever method suits you and get your IDE setup.

Bonus Tip: Using Wakatime For Your Coding Productivity!

Enhancing your productivity while coding means that you can get more done and build better software. One such plugin that can increase your productivity is Wakatime.

Wakatime is used for time tracking meaning you can manage and analyze how much time you spend coding daily. In the spirit of building in public, Wakatime can help you share your metrics on Twitter or LinkedIn.

What’s more, you can include your programming metrics on your Markdown file on Github. Once you have installed Android Studio, head over to Settings/plugins and search for Wakatime.

Install it and restart your IDE, then go ahead and change the world one minute at a time!

References

Conclusion

In this guide we have covered three ways of installing the Android Studio IDE. Properly setting up your IDE allows you to develop your applications smoothly with no bumps. I hope this article has been of help to you.

Follow me on Twitter and Medium for more tutorials and guides.

Источник

How to launch Android Studio using Terminal

I’ve just installed Android Studio. After installing, I forgot to add in the launcher. I restarted the system. Now I want to launch Android Studio from Terminal. I’ve tried everything but didn’t work.

8 Answers 8

cd into the directory where you unzipped the android studio installer zip file. The folder is named android-studio. It could be in your ~/Downloads folder if you downloaded it from the internet. Now cd into the bin folder and run the studio.sh file

if your extracted zip file path is PATH_TO_ZIP_FILE, then type PATH_TO_ZIP_FILE/android-studio/bin/studio.sh . For example if the android-studio folder is in downloads directory type $HOME/Downloads/android-studio/bin/studio.sh

On ubuntu it is /opt/android-studio/bin/studio.sh

You can open terminal by CTRL + ALT + T

just run this command into your terminal

option 1 : set path alias in bashrc file by echo command

echo "alias android='/usr/local/android-studio/bin/studio.sh'" >> ~/.bashrc source .bashrc 

option 2 : set path alias by opening bashrc file.

open bashrc file on nano editor

paste this text in bashrc file

alias android='/usr/local/android-studio/bin/studio.sh' 

ctrl + S to save file . Ctrl + X to exit.

To run android studio, you need to type only

If you want to use terminal to start a program then you should be knowing the command to be written in terminal. To know the command in Kubuntu I use the Kmenuedit. In kmenuedit find that program and that program’s details there will be a field named command there you will find text to be written in terminal. Another option is to check system monitor program that also has a column named command. So you can check running instances of programs and command.

Читайте также:  Принципиальные отличия linux от windows выберите несколько ответов

Источник

How To Install And Run Android Studio On Linux

This article will tell you how to install and run the android studio on Linux. It is not similar to Windows and macOS. If you are a beginner to the android studio, this is very helpful to you.

1. Install Android Studio On Linux Steps.

  1. Download related android studio version from android studio official website. It is just a zip file.
  2. Unzip the download zip file to a local directory for example /home/zhaosong/WorkSpace/Tool/android-studio-ide-181.5056338-linux.
  3. Please note there is also another subfolder named android-studio in the above folder. Now the android studio has been installed successfully.

2. Start Android Studio On Linux.

Start android studio on Linux is also not similar to Windows or macOS, you should run the start script in the terminal to start it.

  1. Open a terminal and go to the android studio unzipped folder.
  2. CD into the bin folder in the android-studio folder.
  3. Execute $ ./studio.sh command in the terminal, then you can see the android studio startup as normal. Maybe there will have some error messages are printed in the terminal but it does not matter.

3. Specify Android SDK And JDK Path In Android Studio.

When the android studio is started, click File —> New —> New Project to create a new android project. If you want to change the default Android SDK and JDK to other folders, you can follow the below steps.

change-android-studio-project-sdk-and-jdk-folder

  1. Click File —> Other Settings —> Default Project Structure… menu item in the android studio top menu bar.
  2. Then you can change the android studio project SDK and JDK folder in the popup dialog window SDK Location & JDK location section. If you are a beginner, you do not need to change them at all.

4. Add Android SDK Command Tool In System PATH.

Generally, you will use android studio to run the android SDK command tool, but sometimes you may need to invoke those android SDK commands in the terminal, so please follow the below steps to add android SDK command execute path in Linux PATH system environment variable value then you can invoke them in the command line.

  1. Get the Android SDK path from the above picture in step 3.
  2. Run the below command to edit the PATH variable value in the .bashrc file.
# go to user home directory. $ cd ~ # edit .bashrc file to add android sdk command path in PATH system environment variable. $ gedit .bashrc Add below in .bashrc file. export PATH=/home/jerry/WorkSpace/Tool/android-studio-ide-181.5056338-linux/android-studio/bin:/home/jerry/Android/Sdk/platform-tools:/home/jerry/Android/Sdk/tools:$PATH # Run below command to make above change take effect, now you can invoke android tool in command line. $ . .bashrc

Источник

Оцените статью
Adblock
detector