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

二次信任 提交于 2019-11-28 16:08:16
Beloo

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

Problem was occurred when android studio conflict with installed jdk version, Go to the (File -> Project Structure -> SDK Location), check 'Use embedded JDK' checkbox and set jdk location to 'path to android studio'\Android Studio\jre :) Simple

Ryuzaki

that didn't work for me, i ran a 'gradle clean build' command, i figured out that there's a conflict in a line in the gradle, deleted it and sync project (as in this pic)

My issue was that I had removed the SDK I was using while clearing up hard drive space.

To fix this, first check what SDKs you have installed, or install one in Tools > SDK Manager.

You can then change the compileSdkVersion and targetSdkVersion in app build.gradle to your installed sdk version.

Otherwise you can just reinstall what ever sdk you were using.

In Android Studio 3.2.1 go to File -> Project Structure -> SDK Location and check in the check box "Use embedded JDK (recommended)".

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!