Android studio创建project时出现报错:”Gradle error : Write access is allowed from event dispatch thread only

今天创建project时在MainActivity.java文件出现报错:”Gradle error : Write access is allowed from event dispatch thread only in android studio "。找了好久没找到解决办法。后来在百度时发现是sdk的问题,在路径处设置Android studio自带的jre,勾选Use embedded JDK(recommended)就好了。

操作如下:
jdk的问题

打开File -> Project Structure -> SDK Location

Android studio创建project时出现报错:”Gradle error : Write access is allowed from event dispatch thread only_第1张图片
勾上勾

你可能感兴趣的:(Android studio创建project时出现报错:”Gradle error : Write access is allowed from event dispatch thread only)