25

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?

30

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.

| improve this answer | |
  • 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? – RagnarLodbrok 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
18

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.

| improve this answer | |
  • 3
    this should be considerer as the best answer – Coeus May 2 '19 at 3:04
  • definetly best answer ! – Mostafa May 3 at 11:09
13

Use these commands in the Terminal

cd /opt/android-studio/bin
./studio.sh
| improve this answer | |
6

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.

| improve this answer | |
2

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.

| improve this answer | |
  • Nice and clean guide, thanks man! – user12061795 May 4 at 23:19
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.

| improve this answer | |
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

| improve this answer | |

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