Gradle error: Write access is allowed from event dispatch thread only in Android Studio

So the problem was concluded in that Android Studio conflicted with my installed JDK version, so it was resolved when I checked JDK location (File → Project Structure → SDK Location), ticked ‘Use embedded JDK’ checkbox and set JDK location to ‘path to Android Studio’\Android Studio\jre

Could not find or load main class org.gradle.wrapper.GradleWrapperMain

Your gradle wrapper is missing, broken or corrupted. What is gradle wrapper:gradlew is the gradle wrapper executable – batch script on windows and shell script elsewhere. The wrapper script when invoked, downloads the defined gradle version and executes it. By distributing the wrapper with your project, anyone can work with it without needing to install Gradle … Read more