2016-12-02 85 views
4

我想運行在Fedora的25
我跑./studio.sh
機器人工作室,我得到這個錯誤:Fedora的 - 機器人工作室沒有運行

OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=350m;support was removed in 8.0 
No protocol specified 

Start Failed: Internal Error. Failed to initialize graphics environment 

java.awt.AWTError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable. 
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) 
at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65) 
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115) 
at java.security.AccessController.doPrivileged(Native Method) 
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74) 
at java.lang.Class.forName0(Native Method) 
at java.lang.Class.forName(Class.java:264) 
at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103) 
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82) 
at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:126) 
at java.lang.Class.forName0(Native Method) 
at java.lang.Class.forName(Class.java:264) 
at java.awt.Toolkit$2.run(Toolkit.java:860) 
at java.awt.Toolkit$2.run(Toolkit.java:855) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:854) 
at java.awt.Toolkit.getEventQueue(Toolkit.java:1734) 
at java.awt.EventQueue.isDispatchThread(EventQueue.java:1043) 
at javax.swing.SwingUtilities.isEventDispatchThread(SwingUtilities.java:1361) 
at javax.swing.text.StyleContext.reclaim(StyleContext.java:454) 
at javax.swing.text.StyleContext.addAttribute(StyleContext.java:311) 
at javax.swing.text.html.StyleSheet.addAttribute(StyleSheet.java:578) 
at javax.swing.text.StyleContext$NamedStyle.addAttribute(StyleContext.java:1501) 
at javax.swing.text.StyleContext$NamedStyle.setName(StyleContext.java:1312) 
at javax.swing.text.StyleContext$NamedStyle.<init>(StyleContext.java:1259) 
at javax.swing.text.StyleContext.addStyle(StyleContext.java:107) 
at javax.swing.text.StyleContext.<init>(StyleContext.java:87) 
at javax.swing.text.html.StyleSheet.<init>(StyleSheet.java:166) 
at javax.swing.text.html.HTMLEditorKit.getStyleSheet(HTMLEditorKit.java:391) 
at com.intellij.util.ui.UIUtil.<clinit>(UIUtil.java:98) 
at com.intellij.ide.plugins.PluginManager.start(PluginManager.java:73) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
at java.lang.reflect.Method.invoke(Method.java:498) 
at com.intellij.ide.Bootstrap.main(Bootstrap.java:39) 
at com.intellij.idea.Main.main(Main.java:113) 

任何想法如何解決這個問題?我試圖取消設置Displayexport Display:=0,但我沒有得到任何解決方案

回答

3

Fedora 25默認不再使用XOrg。我們搬到了Wayland,Java可能不會處理這個問題。將問題報告給Android Studio開發人員(不在這裏)會很好。

無論如何,你可以登錄到您的帳戶時使用舊X.選擇上的XOrg的「GNOME運行Fedora變通辦法:

0

The same problem occurs. I want to launch android studio on Ubuntu 17.10, java version "1.8.0_151"

but not able to launch. run #./studio.sh and I get this error:

No protocol specified 
Start Failed: Internal Error. Failed to initialize graphics environment 

java.awt.AWTError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable. 
    at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) 
    at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65) 
    at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74) 
    at java.lang.Class.forName0(Native Method) 
    at java.lang.Class.forName(Class.java:264) 
    at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103) 
    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82) 
    at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:126) 
    at java.lang.Class.forName0(Native Method) 
    at java.lang.Class.forName(Class.java:264) 
    at java.awt.Toolkit$2.run(Toolkit.java:860) 
    at java.awt.Toolkit$2.run(Toolkit.java:855) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:854) 
    at java.awt.Toolkit.getEventQueue(Toolkit.java:1734) 
    at java.awt.EventQueue.isDispatchThread(EventQueue.java:1043) 
    at javax.swing.SwingUtilities.isEventDispatchThread(SwingUtilities.java:1361) 
    at javax.swing.text.StyleContext.reclaim(StyleContext.java:454) 
    at javax.swing.text.StyleContext.addAttribute(StyleContext.java:311) 
    at javax.swing.text.html.StyleSheet.addAttribute(StyleSheet.java:578) 
    at javax.swing.text.StyleContext$NamedStyle.addAttribute(StyleContext.java:1501) 
    at javax.swing.text.StyleContext$NamedStyle.setName(StyleContext.java:1312) 
    at javax.swing.text.StyleContext$NamedStyle.<init>(StyleContext.java:1259) 
    at javax.swing.text.StyleContext.addStyle(StyleContext.java:107) 
    at javax.swing.text.StyleContext.<init>(StyleContext.java:87) 
    at javax.swing.text.html.StyleSheet.<init>(StyleSheet.java:166) 
    at javax.swing.text.html.HTMLEditorKit.getStyleSheet(HTMLEditorKit.java:391) 
    at com.intellij.util.ui.UIUtil.<clinit>(UIUtil.java:102) 
    at com.intellij.ide.plugins.PluginManager.start(PluginManager.java:73) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
+1

好了,現在我覺得自己很愚蠢:在運行./studio.sh之前,我只是沒有註銷root。所有設置。享受! –