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.

  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.
    change-android-studio-project-sdk-and-jdk-folder

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
0 0 votes
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

1 Comment
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Michael
Michael

thanks for this article.

1
0
Would love your thoughts, please comment.x
()
x