35

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?

0
36

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.

3
  • 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? Jun 21 '15 at 19:49
  • Try logging out and back in, seemed to resolve my issue.
    – woahguy
    Jun 21 '15 at 19:58
  • 4
    In Studio 2.2 the Create Desktop Entry... menu option is under the Tools menu option. There is no Configure option.
    – snark
    Sep 25 '16 at 11:01
25

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.

4
  • 4
    this should be considerer as the best answer May 2 '19 at 3:04
  • 1
    definetly best answer !
    – Mostafa790
    May 3 '20 at 11:09
  • Keep support this and upboat.
    – Pawan Soni
    Dec 22 '20 at 16:23
  • My version doesn't give you the option to create desktop entry (Arctic Fox 2020.3.1)
    – guero64
    Oct 19 '21 at 12:33
17

Use these commands in the Terminal

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

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.

4

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.

0
1

There are a few steps to run Android Studio by clicking the Launcher icon.

  1. Execute your studio.sh file located in bin folder of Android Studio, like my Android Studio is located in Downloads (~/Downloads/android-studio/bin). You are in bin folder, now run this command: ./studio.sh

In Ubuntu System-Product-Name:~/Downloads/android-studio/bin$ ./studio.sh

  1. Android Studio will be launched using the above command, next close the project using File -> Close Project from Android Studio, then you'll find this screen:

    enter image description here

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

  2. Finally you have to lock Android Studio to Launcher icon when you press right-click on Android Studio (on the left of the screen) click Lock to Launcher or Add to Favorites.

0

After you start Android Studio for first time from the terminal with the command /path/to/android-studio/studio.sh there will be shown an icon on your launcher. Just right click it and choose "lock to launcher" and that's it - now you can start it from there

Not the answer you're looking for? Browse other questions tagged or ask your own question.