简体   繁体   中英

'Project Structure' in Android Studio doesn't launch

I'm having this issue launching the File>Project Structure. Everytime I try to I'm told the following:

 3:40:36 PM NullPointerException: null 3:40:47 PM Throwable: module editors was not disposed 3:40:49 PM Throwable: module editors was not disposed (on second try) 

Apparently the first issue is due to an exception in the Android Support plugin and the second and third are due to an exception in the Android Studio core. Anybody know what this means and how I can solve it?

EDIT: These are the details of the issue:

 module editors was not disposed java.lang.Throwable at com.intellij.openapi.diagnostic.Logger.error(Logger.java:113) at com.intellij.openapi.roots.ui.configuration.ModulesConfigurator$5.run(ModulesConfigurator.java:196) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1002) at com.intellij.openapi.roots.ui.configuration.ModulesConfigurator.resetModuleEditors(ModulesConfigurator.java:192) at com.intellij.openapi.roots.ui.configuration.projectRoot.StructureConfigurableContext.reset(StructureConfigurableContext.java:176) at com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable.reset(ProjectStructureConfigurable.java:336) at com.intellij.openapi.options.ex.SingleConfigurableEditor.<init>(SingleConfigurableEditor.java:66) at com.intellij.openapi.options.ex.SingleConfigurableEditor.<init>(SingleConfigurableEditor.java:89) at com.intellij.openapi.options.ex.SingleConfigurableEditor.<init>(SingleConfigurableEditor.java:104) at com.intellij.ide.actions.ShowSettingsUtilImpl.editConfigurable(ShowSettingsUtilImpl.java:242) at com.intellij.ide.actions.ShowSettingsUtilImpl.editConfigurable(ShowSettingsUtilImpl.java:217) at com.intellij.ide.actions.ShowStructureSettingsAction.actionPerformed(ShowStructureSettingsAction.java:40) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:162) at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:260) at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:892) at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:114) at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:230) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:104) at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:512) at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:44) at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:532) at java.awt.Component.processMouseEvent(Component.java:6505) at javax.swing.JComponent.processMouseEvent(JComponent.java:3321) at java.awt.Component.processEvent(Component.java:6270) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4861) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422) at java.awt.Container.dispatchEventImpl(Container.java:2273) at java.awt.Window.dispatchEventImpl(Window.java:2719) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:694) at java.awt.EventQueue$3.run(EventQueue.java:692) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:708) at java.awt.EventQueue$4.run(EventQueue.java:706) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:705) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:696) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:520) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) at java.awt.EventDispatchThread.run(EventDispatchThread.java:91) 

I had the same issue.Try the following

close Android studio.Open CMD

Try adb kill-server and adb start-server and restart the adb and then studio.

在此输入图像描述

Unselect the option.I think it's a bug.

I had exactly the same issue & Exception, but only in my main project, which had a mixture of Java, Android, Groovy and Robolectric modules in them. I think trying to get Robolectric to work in AS led to the problem you describe, but I'm not 100% sure.

Long story short: After hours of editing IML files and config files in the .idea folder, I gave up; created a fresh Project, then for each module in the original project, I i) Manually recreated an empty module in the new project of the required type (Java/ Android etc.) ii) Copied the source code (and gradle files) to the new project. I did NOT copy any .iml or .idea configuration files.

Not a great solution, but I got the Project Structure dialog back. And everything seems to be playing nice now.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM