新安装的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。
本文解决了在使用AndroidStudio编译工程时遇到的Writeaccessisallowedfromeventdispatchthreadonly错误。通过更换为AndroidStudio自带的JRE版本,避免了与本地安装的JDK版本冲突的问题。
5万+

被折叠的 条评论
为什么被折叠?



