1. 程式人生 > >Android Studio報錯:Write access is allowed from event dispatch thread only

Android Studio報錯:Write access is allowed from event dispatch thread only

新安裝的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。