Android Studio worked fine everyday. But since yesterday, it started showing an error when I create a new project. When I hit Finish to create a new project, nothing happens except this error shows up:
CalledFromWrongThreadException
Access is allowed from event dispatch thread only.
Details: EventQueue.isDispatchThread()=false
isDispatchThread()=false
Toolkit.getEventQueue()=com.intellij.ide.IdeEventQueue@7593de93
Current thread: Thread[ApplicationImpl pooled thread 13,4,main] 374296670
SystemEventQueueThread: Thread[AWT-EventQueue-0 1.4#AI-141.2288178, eap:false,6,main] 400805665
"AWT-EventQueue-0 1.4#AI-141.2288178, eap:false" prio=0 tid=0x0 nid=0x0 runnable
java.lang.Thread.State: RUNNABLE
at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl.access$100(InjectedLanguageManagerImpl.java:66)
at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl$3.daemonCancelEventOccurred(InjectedLanguageManagerImpl.java:109)
at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.util.messages.impl.MessageBusConnect... (show balloon)
If I click show balloon, it shows the expanded version. It's too big so I decided to post the brief one. I'm using Android Studio 1.4
Thank you for the help.
I was facing the same problem a few minutes ago and this worked for me. Just go to Tools-> SDK Manager . You can see Android SDK Location there.
Screenshot:
Check all 3 components and click on Next . Wait until it installs & updates Android SDK Location.
Screenshot:
Soon build should start and complete successfully. I hope it helps someone who's having the same problem in 2019 onwards :)
This is due to conflict of your installed jdk. Go to Project Structure -> SDK Location,un check 'Use embedded JDK' checkbox and put your jdk path
This is what worked for me. Android Studio v2.2.2.
Probably is android Studio problem.
I see similar problems, try this:
1 Save android Studio Projects. 2 Uninstall android Studio 3 Install Android Studio.
Tell us what happend.
Try restarting your computer. It looks like a Thread is running lose somewhere. If that doesn't work, try reinstalling as some file may be corrupt.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.