How To Install And Run Android Studio On Linux

This article will tell you how to install and run android studio on Linux. It is not similar with Windows and MacOS. If you are beginner to 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 sub folder named android-studio in 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 with Windows or MacOS, you should run the start script in terminal to start it.

  1. Open a terminal and go to the android studio unzipped folder.
  2. CD into the bin folder in android-studio folder.
    go to android studio execute script bin folder
  3. Execute $ ./ command in terminal, then you can see the android studio startup as normal. Maybe there are some error message are printed in the terminal but it dose 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 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 as below. 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 android sdk command tool, but sometimes you may need to invoke those android sdk command in terminal, so please follow below steps to add android sdk command execute path in Linux PATH system environment variable value then you can invoke them in command line.

  1. Get android SDK path from above picture in step 3.
  2. Run below command to edit the PATH variable value in .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
Notify of

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

1 Comment
Oldest Most Voted
Inline Feedbacks
View all comments

thanks for this article.

Would love your thoughts, please comment.x