Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error When Creating a New Project in Android Studio

Tags:

android

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.

like image 975
N Suhaib Avatar asked Sep 06 '25 03:09

N Suhaib


2 Answers

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

like image 75
solomon abel Avatar answered Sep 07 '25 21:09

solomon abel


Go to File -> Invalidate cache / Restart.

This might clear the cache and create a fresh session for android studio.

enter image description here

like image 25
Mayuri Khinvasara Avatar answered Sep 07 '25 21:09

Mayuri Khinvasara