Android Studio NoClassDefFoundError: java.awt.Toolkit : 
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( 

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

Recent Posts:
Hello there!,

You are using AdBlocker!

I am an independent developer trying to help fellow developers and students to resolve issues faced on a day-to-day basis, we 'Code to Care' . There is a lot of expenses involved in hosting and managing a website that's the reason we have ads.

A humble request to you to disable adBlocker on and support us pay our bills.

Cod2ecare - Line's of code for change.

To see contents reload page after unblocking
Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.