198

I'm trying to install Android Studio so that I can launch it from a launcher instead of via terminal.

Android Studio > Tools > Create Desktop Entry doesn't do anything

Can someone give specific instructions please?

I think this is something to do with the permissions in /usr/local/ I tried doing a chmod as explained in this article and it still didn't work.

I tried modifying the Android Studio launcher file that was in /usr/share/applications/ and it would not launch the app under my user. If I launch it as root it's fine, but that's not very practical.

8
  • What do you want to do finally? An icon to launch it, or alias? I personally recommend to do both options. You should read this post to add the commands to your PATH.
    – Lucio
    May 22, 2013 at 22:12
  • If some answer has been useful for you, please upvote it and mark it as accepted. So your question remains as answered. Thanks
    – Lucio
    Jun 1, 2013 at 20:32
  • None of the answers have helped, I have spent the past two and a half hours trying to do this with no luck; I'm completely befuddled
    – spences10
    Jun 7, 2013 at 21:31
  • What you didn't mentioned specifically what do you want to have as a result. I've added the android tools to my PATH and created an Icon on my desktop with the answer of @Shah. So if you have a new problem you should tell us what is that problem, otherwise, accept an answer.
    – Lucio
    Jun 9, 2013 at 1:28
  • I have the file in usr/local the solution given is for /home/programs/ there be different permissions there. Unable to locate suitable startup script in '/home/user/programs/androidstudio/android-studio/bin'.
    – spences10
    Jun 9, 2013 at 8:19

9 Answers 9

314
Android Studio -> Tools -> Create Desktop Entry

enter image description here

Now, you should be able to see in your system menu:

enter image description here

8
  • 9
    Your solution is pretty simple. Thank u so much! May 23, 2015 at 20:01
  • 4
    thank you... its so simple to do... you saved my time...
    – Anuj TBE
    Aug 2, 2015 at 15:59
  • This didn't work when I marked 'create desktop entry for all users'. Unchecking this option, the shortcut remained alive after reboot
    – voghDev
    Aug 28, 2016 at 16:46
  • 1
    FYI, it also works in ElementaryOS, which is also an Ubuntu-based distro. May 7, 2019 at 1:15
  • It doesn't get easier. Super helpful.
    – Eric kioko
    Jun 11, 2020 at 19:49
161

Here is my AndroidStudio .desktop file which works from the launcher.

[Desktop Entry]
Version=1.0
Type=Application
Name=Android Studio
Exec="/home/username/Programs/AndroidStudio/bin/studio.sh" %f
Icon=/home/username/Programs/AndroidStudio/bin/studio.png
Categories=Development;IDE;
Terminal=false
StartupNotify=true
StartupWMClass=jetbrains-android-studio
Name[en_GB]=android-studio.desktop

If you are unable to create an entry for Android Studio on the Unity launcher through the Tools > Create Desktop Entry... option, it is possible that you might have a Unity generated jetbrains-android-studio.desktop in your ~/.local/share/applications folder. To confirm, open the file and check for the following entry:

X-UnityGenerated=true

Delete the file and try again.


Alternatively, you can also open Android Studio, click on Configure -> Create Desktop Entry. This should create an entry on the dash:

screenshoot

10
  • Could you explain further the value of the Exec property?
    – Lucio
    May 25, 2013 at 0:25
  • Yeah your alternate note was what I tried and got the message I have posted in the main post. The .desktop file I can Google how to create that, right?
    – spences10
    May 28, 2013 at 7:44
  • 1
    It is easiest to do the "alternate". From the Android Studio welcome screen just click "Configure" and then "Create Desktop Entry". Then you can search in Dash and Lock to Launcher.
    – noisygecko
    Jun 7, 2013 at 17:19
  • 1
    somehow, both methods not working for 14.04...
    – cwhsu
    Nov 4, 2014 at 0:47
  • @Lucio I don't have any experience with Ubuntu, but it looks (and sounds) like that is the location of the executable/runnable/binary/program/whatever it is called in Ubuntu. Apr 29, 2015 at 13:18
17

You can open Android Studio, click on Configure -> Create Desktop Entry. This should create an entry on the dash.

3
  • 1
    While the accepted answer is quite valid and could be adapted for other applications, this is the simplest way to create an entry.
    – revnoah
    Jan 13, 2015 at 23:22
  • But it requires setting up path variable so you should explicitly mention it in your answer
    – Chinmaya B
    Feb 19, 2015 at 15:24
  • 1
    Is not Configure but Tools instead. Aug 22, 2020 at 13:06
10

From the quick start panel, (which opens up once android-studio IDE launched), click on "Configure" which takes you to the configure panel then click on "Create Desktop Entry".

You can also go to Tools -> Create Desktop Entry once you're inside an Android Studio Project.

This basically puts a jetbrains-android-studio.desktop file into your Ubuntu's ~/.local/share/applications folder.

1
  • simple and elegant , tank you...
    – amdev
    Dec 7, 2018 at 15:03
3
  1. Open Android Studio.
  2. Right-click its icon in the launcher.
  3. "Lock to Launcher".
3
  • Your answer while possible may be a bit late as the OP already accepted the other answer. Your help is of course appreciated, however you might be better served by focusing your efforts on the unanswered questions
    – Wayne_Yux
    Jan 11, 2016 at 16:00
  • Dosn't work on Ubuntu 17 for some reason. The "lock to launcher" doesn't show. Apr 1, 2018 at 0:00
  • Effective on 16.04 + Android Studio 3.5.3
    – gatorback
    Dec 7, 2019 at 20:41
2

The best way I know of doing this is, open Android Studio then under Tools click on "Create Desktop Entry". This will list android studio in all programs list, from there you can add the application to quick launch.

2

Android studio does not seem to have this option to 'Create a desktop entry' anymore, so I decided to switch to using snaps.

I was able to install android studion using this snap:

https://github.com/snapcrafters/android-studio

The install command is listed on the github link, but here it is anyways:

sudo snap install android-studio --classic

This will install and manage any updates for android studio, as well as add a desktop entry!


If you are interested in having something like this for some JetBrains IDE's, then checkout Toolbox!

1
  • This question is five years old, I doubt any of it is relevant still - thanks for your contribution though @smac89 👍
    – spences10
    Jun 21, 2018 at 5:58
0

For Android Studio 1.2+ the WM_CLASS is jetbrains-studio. So you have to add or change

StartupWMClass=jetbrains-studio

to your android-studio.desktop file.

1
  • Suggest an edit, please.
    – muru
    May 22, 2015 at 14:32
0

I solved this changing android-studio from /usr/local/ to /opt/ Then I configured using the tools menu Android studio 4.1.3

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .