新安装的android studio 编译工程时出现了Write access is allowed from event dispatch thread only 的错误。
在stackoverflow中发现答案:
So the problem was concluded in that android studio conflicted with my installed jdk version, so it was resolved when i checked jdk location (Project Structure -> SDK Location), ticked ‘Use embedded JDK’ checkbox and set jdk location to ‘path to android studio’\Android Studio\jre
意思就是:
给当前的android studio的jdk换个版本,使用android studio 自带的jre,因为自己电脑安装的jdk版本(以前安装过)和android studio sdk版本冲突。而且如果电脑没有安装过JDK,那么同理也一样使用android studio 自带的jre。