Android Studio not starting on Linux (CentOS 6.6) -


i'm trying run android studio on centos 6.6. i've downloaded studio , per instructions when move directory /android-studio/bin/ , run following command ./studio.sh

i got following exception

[root@localhost bin]# ./studio.sh  no protocol specified start failed: internal error. please report https://code.google.com/p/android/issues java.lang.reflect.invocationtargetexception @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606) @ com.intellij.ide.bootstrap.main(bootstrap.java:39) @ com.intellij.idea.main.main(main.java:83)  caused by: java.lang.internalerror: can't connect x11 window server using ':0.0' value of display variable. @ sun.awt.x11graphicsenvironment.initdisplay(native method) @ sun.awt.x11graphicsenvironment.access$200(x11graphicsenvironment.java:65) @ sun.awt.x11graphicsenvironment$1.run(x11graphicsenvironment.java:110) @ java.security.accesscontroller.doprivileged(native method) @ sun.awt.x11graphicsenvironment.<clinit>(x11graphicsenvironment.java:74) @ java.lang.class.forname0(native method) @ java.lang.class.forname(class.java:191) @ java.awt.graphicsenvironment.createge(graphicsenvironment.java:102) @ java.awt.graphicsenvironment.getlocalgraphicsenvironment(graphicsenvironment.java:81) @ sun.awt.x11.xtoolkit.<clinit>(xtoolkit.java:120) @ java.lang.class.forname0(native method) @ java.lang.class.forname(class.java:191) @ java.awt.toolkit$2.run(toolkit.java:869) @ java.security.accesscontroller.doprivileged(native method) @ java.awt.toolkit.getdefaulttoolkit(toolkit.java:861) @ java.awt.toolkit.geteventqueue(toolkit.java:1756) @ java.awt.eventqueue.isdispatchthread(eventqueue.java:1025) @ javax.swing.swingutilities.iseventdispatchthread(swingutilities.java:1360) @ javax.swing.text.stylecontext.reclaim(stylecontext.java:454) @ javax.swing.text.stylecontext.addattribute(stylecontext.java:311) @ javax.swing.text.html.stylesheet.addattribute(stylesheet.java:578) @ javax.swing.text.stylecontext$namedstyle.addattribute(stylecontext.java:1501) @ javax.swing.text.stylecontext$namedstyle.setname(stylecontext.java:1312) @ javax.swing.text.stylecontext$namedstyle.<init>(stylecontext.java:1259) @ javax.swing.text.stylecontext.addstyle(stylecontext.java:107) @ javax.swing.text.stylecontext.<init>(stylecontext.java:87) @ javax.swing.text.html.stylesheet.<init>(stylesheet.java:166) @ javax.swing.text.html.htmleditorkit.getstylesheet(htmleditorkit.java:392) @ com.intellij.util.ui.uiutil.<clinit>(uiutil.java:97) @ com.intellij.ide.plugins.pluginmanager.start(pluginmanager.java:71) ... 6 more   also, ui exception occurred on attempt show above message: java.lang.noclassdeffounderror: not initialize class sun.awt.x11graphicsenvironment @ java.lang.class.forname0(native method) @ java.lang.class.forname(class.java:191) @ java.awt.graphicsenvironment.createge(graphicsenvironment.java:102) @ java.awt.graphicsenvironment.getlocalgraphicsenvironment(graphicsenvironment.java:81) @ javax.swing.repaintmanager.<clinit>(repaintmanager.java:212) @ javax.swing.jcomponent.repaint(jcomponent.java:4796) @ java.awt.component.repaint(component.java:3297) @ javax.swing.text.jtextcomponent.seteditable(jtextcomponent.java:1807) @ javax.swing.text.jtextcomponent.<init>(jtextcomponent.java:319) @ javax.swing.jeditorpane.<init>(jeditorpane.java:197) @ javax.swing.jtextpane.<init>(jtextpane.java:90) @ com.intellij.idea.main.showmessage(main.java:231) @ com.intellij.idea.main.showmessage(main.java:217) @ com.intellij.idea.main.main(main.java:86) 

i have no idea now. here environment variables , java version.

[root@localhost /]# javac -version javac 1.8.0_45 [root@localhost /]# java -version java version "1.7.0_79" openjdk runtime environment (rhel-2.5.5.3.el6_6-x86_64 u79-b14) openjdk 64-bit server vm (build 24.79-b02, mixed mode) [root@localhost /]# echo $java_home /usr/lib/jvm/jre-1.7.0-openjdk.x86_64 [root@localhost /]# echo $path /usr/local/bin:/bin:/usr/bin 

dont know problem $java_home changing automatically. whenever i've start android-studio i've set correct path again , again like:

export java_home=/home/path/to/jdk1.8.0_45 

Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -