android-studio icon indicating copy to clipboard operation
android-studio copied to clipboard

Unable to launch

Open gfelot opened this issue 10 years ago • 16 comments

Hi Paolo Rotolo,

I'm on a fresh install of Ubuntu 15.04. I installed via your repo Android Studio but the program doesn't appear anywhere. Even via a terminal my PC didn't found the bin or something related to.

Thanks.

gfelot avatar Mar 24 '15 13:03 gfelot

Hi, thanks for your report.

Please, open a terminal and paste this command: /opt/android-studio/bin/studio.sh

Can you tell me if it works :)?

paolorotolo avatar Apr 22 '15 20:04 paolorotolo

I had the same problem on ubuntu 14 , with /opt/android-studio/bin/studio.sh it launched it ... thank you

chemouna avatar Apr 25 '15 19:04 chemouna

Are you using Unity or GNOME? Also Ubuntu i386 or amd64?

paolorotolo avatar Apr 25 '15 19:04 paolorotolo

Unity and amd64

chemouna avatar Apr 26 '15 13:04 chemouna

Same problem here: no app appearing in the dash. Ubuntu 15.04 Unity 64 bit

With /opt/android-studio/bin/studio.sh the software is launched.

milesimarco avatar May 13 '15 19:05 milesimarco

Could you paste here what's in android-studio.desktop file in /usr/share/applications please?

nano /usr/share/applications/android-studio.desktop

paolorotolo avatar May 14 '15 11:05 paolorotolo

Me too (Ubuntu 15.04 Unity & 64 Bits). Here's the content of .desktop file ->

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Name=Android Studio
Exec=/opt/android-studio/bin/studio.sh
Comment=Integrated Android developer tools for development and debugging.
Icon=androidstudio
Categories=GNOME;GTK;Development;IDE;

maelsan avatar May 14 '15 16:05 maelsan

I got this error:

Start Failed: Internal error. Please report to https://code.google.com/p/android/issues

java.lang.NoClassDefFoundError: com.intellij.util.lang.ClassPath at java.lang.Class.initializeClass(libgcj.so.14) at com.intellij.util.lang.UrlClassLoader.createClassPath(UrlClassLoader.java:179) at com.intellij.util.lang.UrlClassLoader.(UrlClassLoader.java:173) at com.intellij.util.lang.UrlClassLoader$Builder.get(UrlClassLoader.java:128) at com.intellij.ide.BootstrapClassLoaderUtil.initClassLoader(BootstrapClassLoaderUtil.java:68) at com.intellij.ide.Bootstrap.main(Bootstrap.java:32) at com.intellij.idea.Main.main(Main.java:83) Caused by: java.lang.ClassNotFoundException: sun.misc.Resource not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/opt/android-studio/bin/../lib/bootstrap.jar,file:/opt/android-studio/bin/../lib/extensions.jar,file:/opt/android-studio/bin/../lib/util.jar,file:/opt/android-studio/bin/../lib/jdom.jar,file:/opt/android-studio/bin/../lib/log4j.jar,file:/opt/android-studio/bin/../lib/trove4j.jar,file:/opt/android-studio/bin/../lib/jna.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}} at java.net.URLClassLoader.findClass(libgcj.so.14) at java.lang.ClassLoader.loadClass(libgcj.so.14) at java.lang.ClassLoader.loadClass(libgcj.so.14) at java.lang.Class.forName(libgcj.so.14) at java.lang.Class.initializeClass(libgcj.so.14) ...6 more

Also, an UI exception occurred on attempt to show above message: java.lang.ExceptionInInitializerError at java.lang.Class.initializeClass(libgcj.so.14) at com.intellij.util.containers.ConcurrentIntObjectHashMap.getUnsafe(ConcurrentIntObjectHashMap.java:2787) at com.intellij.util.containers.ConcurrentIntObjectHashMap.(ConcurrentIntObjectHashMap.java:2752) at java.lang.Class.initializeClass(libgcj.so.14) at com.intellij.util.containers.ContainerUtil.createConcurrentIntObjectMap(ContainerUtil.java:2334) at com.intellij.util.containers.ConcurrentRefValueIntObjectHashMap.(ConcurrentRefValueIntObjectHashMap.java:31) at com.intellij.util.containers.ConcurrentWeakValueIntObjectHashMap.(ConcurrentWeakValueIntObjectHashMap.java:31) at com.intellij.util.containers.ContainerUtil.createConcurrentIntObjectWeakValueMap(ContainerUtil.java:2362) at com.intellij.openapi.util.Key.(Key.java:38) at java.lang.Class.initializeClass(libgcj.so.14) at com.intellij.util.ui.UIUtil.(UIUtil.java:202) at java.lang.Class.initializeClass(libgcj.so.14) at com.intellij.idea.Main.showMessage(Main.java:234) at com.intellij.idea.Main.showMessage(Main.java:217) at com.intellij.idea.Main.main(Main.java:86) Caused by: java.lang.RuntimeException: Could not find 'theUnsafe' field in the class sun.misc.Unsafe at com.intellij.util.concurrency.AtomicFieldUpdater.getUnsafe(AtomicFieldUpdater.java:44) at com.intellij.util.concurrency.AtomicFieldUpdater.(AtomicFieldUpdater.java:38) at java.lang.Class.initializeClass(libgcj.so.14)

Please assist.

mrzulkarnine avatar Aug 01 '15 11:08 mrzulkarnine

Nevermind, I fixed it by installing jdk 7

mrzulkarnine avatar Aug 01 '15 12:08 mrzulkarnine

I solved this using 'sudo desktop-file-install android-studio.desktop' on /usr/share/applications

loide avatar Aug 28 '15 02:08 loide

I experimented this issue on Linux Mint 17.1. @loide's solution works like a charm, thanks!

bibz avatar Aug 30 '15 08:08 bibz

Awesome guys, I'm going to add the tip in FAQ. :+1:

paolorotolo avatar Aug 30 '15 09:08 paolorotolo

Same problem appear after installing jdk 8 after android studio. @loide 's solution worked for me ! @PaoloRotolo , I can't see the trick on the FAQ, did you just forgot to update it or am I just missing the info somewhere ?

Rafnuss avatar Nov 23 '15 09:11 Rafnuss

@loide's suggestion

sudo desktop-file-install /usr/share/applications/android-studio.desktop

works on Ubuntu 14.04 LTS. Thanks a log!

FranklinYu avatar Feb 26 '16 05:02 FranklinYu

@loide 's solution works on LinuxMint17.3 x64 cinema

ghost avatar Mar 16 '16 15:03 ghost

I had the same problem and on my second attempt on a new machine I found this to be prequisits: #Install Java8 sudo apt-add-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer

#configure Java8 (in my case I had to select 1) sudo update-alternatives --config java

#this stuff is required to avoid mksdcard error on first run of the studio sudo apt-get install lib32z1 lib32ncurses5 lib32stdc++6

#press ctrl+w and search for "MaxPermSize" and remove the line sudo nano /opt/android-studio/bin/studio64.vmoptions sudo nano /opt/android-studio/bin/studio.vmoptions

Then install AS and reboot. Everything should work then.

codingyourlife avatar May 04 '16 01:05 codingyourlife