Android Studio NoClassDefFoundError: java.awt.Toolkit

Posted on : Fri, 16th Oct 15 01:06 pm UTC
100+ votes : 
Exception in thread "main" java.lang.NoClassDefFoundError: java.awt.Toolkit : at sun.awt.AppContext$[2226]: at sun.awt.AppContext$[2226]: at Method)[2226]: at sun.awt.AppContext.initMainAppContext([2226]: at sun.awt.AppContext.access$200([2226]: at sun.awt.AppContext$[2226]: at Method)[2226]: at sun.awt.AppContext.getAppContext([2226]: at sun.awt.AppContext$6.getContext([2226]: at sun.misc.SharedSecrets.getJavaAWTAccess([2226]: at java.util.logging.LogManager.getUserContext([2226]: at java.util.logging.LogManager.getLogger([2226]: at java.util.logging.LogManager.demandLogger([2226]: at java.util.logging.Logger.demandLogger([2226]: at java.util.logging.Logger.getLogger([2226]: at java.awt.Component.([2226]: at com.intellij.idea.Main.showMessage([2226]: at com.intellij.idea.Main.showMessage([2226]: at com.intellij.idea.Main.main( 

If you get the above stack-trace in Android Studio then the reason is the Java JDK version. If you are working on Mac OS X OS version 10.6 or lower you cannot install JDK1.7.

Code2care's mission is to share varied knowledge in technical and non-technical areas gathered during day-to-day learnings and development activities so that our visitors can leverage this portal to find solutions to their queries without re-inventing the wheel. Technical posts include Learnings, Tutorials, Video Tutorials, Code Snippets, Tips-n-tricks.

Follow us : Facebook - Twitter - Google +