Possible solution for "Failed to initialize sun.awt.X11.XToolkit class"?

I get below errors when developing a layout for an Android application (could not open the layout in the layout editor window)

Could not initialize class sun.awt.X11.XToolkit Exception details are logged in Window > Show View > Error Log 

Here is the error log window:

enter image description here

FYI, I:

  • Eclipse indigo
  • ADT to 15.0.1 (Version: 15.0.1.v201111031820-219398)
  • Tried to choose Target as Android SDK 2.2, 2.3, even 3.0, but without success.
  • I have a β€œcompiler matching level” of 1.6 (there are also 1.7), I also tried installing 1.7, but was unsuccessful.

Do you know a possible solution to this error?

Update:

 paresh@comp35 :~$ java -version java version "1.6.0_18" OpenJDK Runtime Environment (IcedTea6 1.8.2) (6b18-1.8.2-4ubuntu2) OpenJDK Server VM (build 16.0-b13, mixed mode) 
+4
source share
1 answer

Not really, but try updating the Java SDK. 1.6.0_18 is ancient.

+1
source

Source: https://habr.com/ru/post/1382839/


All Articles