com.google.android.studio :
Exception in thread "main" java.lang.NoClassDefFoundError: java.awt.Toolkit
com.google.android.studio : at sun.awt.AppContext$2.run(AppContext.java:217)
com.google.android.studio[2226]: at sun.awt.AppContext$2.run(AppContext.java:213)
com.google.android.studio[2226]: at java.security.AccessController.doPrivileged(Native Method)
com.google.android.studio[2226]: at sun.awt.AppContext.initMainAppContext(AppContext.java:251)
com.google.android.studio[2226]: at sun.awt.AppContext.access$200(AppContext.java:124)
com.google.android.studio[2226]: at sun.awt.AppContext$3.run(AppContext.java:339)
com.google.android.studio[2226]: at java.security.AccessController.doPrivileged(Native Method)
com.google.android.studio[2226]: at sun.awt.AppContext.getAppContext(AppContext.java:221)
com.google.android.studio[2226]: at sun.awt.AppContext$6.getContext(AppContext.java:557)
com.google.android.studio[2226]: at sun.misc.SharedSecrets.getJavaAWTAccess(SharedSecrets.java:134)
com.google.android.studio[2226]: at java.util.logging.LogManager.getUserContext(LogManager.java:241)
com.google.android.studio[2226]: at java.util.logging.LogManager.getLogger(LogManager.java:894)
com.google.android.studio[2226]: at java.util.logging.LogManager.demandLogger(LogManager.java:291)
com.google.android.studio[2226]: at java.util.logging.Logger.demandLogger(Logger.java:463)
com.google.android.studio[2226]: at java.util.logging.Logger.getLogger(Logger.java:243)
com.google.android.studio[2226]: at java.awt.Component.(Component.java:356)
com.google.android.studio[2226]: at com.intellij.idea.Main.showMessage(Main.java:467)
com.google.android.studio[2226]: at com.intellij.idea.Main.showMessage(Main.java:267)
com.google.android.studio[2226]: at com.intellij.idea.Main.main(Main.java:24)
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.
More Posts related to Android-Studio,
- Locate MainActivity Java or Kotlin file in Android Studio
- groovy.lang.MissingPropertyException No such property Error
- How to fix java.net.NoRouteToHostException in Android Studio
- Your Android SDK is missing, out of date or corrupted SDK Problem
- [Android Studio] MainActivity does not exist
- [Android Studio] Could not automatically detect an ADB binary
- Android Studio: Cannot perform refactoring operation
- How to Configure Eclipse keymap in IntelliJ IDE
- Android Studio setup was canceled - How to resume
- [Android Studio] Hardcoded string Button, should use @string resource
- The selected device is incompatible : Android Studio
- Android Activity Main xml stuck loading
- Android Studio 1.3 beta now Available for Developers
- Installing Android Studio Dolphin on Mac with Apple (M1/M2) Chip
- Android Studio 4.2 Canary 1 now available
- [Android Studio] Button on click example
- Eclipse like Auto Import Shortcut in Intelij IDE Android Studio
- How to enable line numbers in IntelliJ Android Studio for all files
- Delete Android Studio Projects
- How to update Android Studio
- [Android Studio] Error: Missing system image on device
- macOS Big Sur java.lang.UnsatisfiedLinkError CoreFoundation - Android Studio
- Android [SDK Manager] The system cannot find the path specified
- Failed to install Android.apk on device 'emulator-5554': timeout
- [Solved] Error launching studio
More Posts:
- Ubuntu zsh: command not found: nano - zsh
- Create Duplicate Line Visual Studio Code (above or below) Example - HowTos
- [Solved] SharePoint Search Internal server error exception - SharePoint
- Android : Class file collision: A resource exists with a different case - Android
- Get the Size of HTTP Response using cURL Command (Content Length) - cURL
- Android Activity Main xml stuck loading - Android-Studio
- Install Docker Desktop on M1/M2 Apple Silicon ARM Chip Mac - Docker
- Go to Line Number option in Windows Notepad - NotepadPlusPlus