Run Android Studio after installation (and other programs)

218,600

Solution 1

Short answer

You need to run it via the studio.sh, every time, as that is the startup script.

Long answer

It will not truly 'install'. It is kind of an annoyance for first time users, but it is truly a stand-alone package, it will drop the SDK in your /home and you need the android-studio and jdk1.8.0_45 folders at a fixed location.

First, you need to set the JAVA_HOME path in your /etc/environment or ~/.bashrc configuration to the jdk1.8.0_45 folder before it will run.

After setting your JAVA_HOME, run studio.sh again and it will boot the IDE. Then at the menu, hit the Configure button then hit Create Desktop Entry. You should now have a start menu icon, and desktop icon which you can easily use.

Next time you boot and create a project it should download the SDK required for building.

Solution 2

Just wanted to let you know that you don't have to run the install every time. Here is how I installed Android Studio, and how I run it from my applications menu.

At the Android Studio start screen below, click on configure then create desktop entry.

Screenshot of start screen

Now you should have a shortcut in your applications menu.

Solution 3

Use these commands in the Terminal

cd /opt/android-studio/bin
./studio.sh

Solution 4

You can create a file "studio.desktop" in /usr/share/applications with the following contents:

[Desktop Entry]
Name=Android Studio
Comment=Android Studio
Exec=/opt/android-studio/bin/studio.sh
Icon=/opt/android-studio/bin/studio.png
Terminal=false
Type=Application
Categories=Development

Assuming you put android-studio in /opt, this allows you to launch from the application launcher. Otherwise adjust to your android-studio folder location.

Solution 5

To add shortcut command for Terminal to open Android-Studio::

To run from Terminal create a file named studio inside /bin folder and write following contents inside the file named studio.

cd /opt/android-studio/bin 
./studio.sh

Then type in terminal cd /bin and chmod +x studio.

Now, if you want to open it just type studio in Terminal.

To add shortcut Application Icon to open Android-Studio::

Create file inside /usr/share/applications named studio.desktop with the following contents:

[Desktop Entry]
Name=Android Studio
Comment=Android Studio
Exec=/opt/android-studio/bin/studio.sh
Icon=/opt/android-studio/bin/studio.png
Terminal=false
Type=Application
Categories=Development

After that you can Android Studio Application launcher is added automatically.

Share:
218,600

Related videos on Youtube

RagnarLodbrok
Author by

RagnarLodbrok

Updated on September 18, 2022

Comments

  • RagnarLodbrok
    RagnarLodbrok over 1 year

    I downloaded Android Studio from the official website, started the installer with the terminal (studio.sh) it installed completely, wrote some lines of code, closed Android Studio, now I don't know how I can open it again. the studio.sh just starts the setup wizard again and I also can't find the directory where it could be installed in.

    So where are the installed programs at and how can I run them?

  • RagnarLodbrok
    RagnarLodbrok almost 9 years
    Thanks for your answer. If i click on 'Create Desktop Entry' in Android Studio, it doesn't do anything. Do I have to configure something else?
  • woahguy
    woahguy almost 9 years
    Try logging out and back in, seemed to resolve my issue.
  • EagleCode16
    EagleCode16 about 5 years
    this should be considerer as the best answer
  • Mostafa790
    Mostafa790 about 4 years
    definetly best answer !
  • Pawan Soni
    Pawan Soni over 3 years
    Keep support this and upboat.
  • guero64
    guero64 over 2 years
    My version doesn't give you the option to create desktop entry (Arctic Fox 2020.3.1)