Android studio 4.0 editor window is gone

谁说胖子不能爱 提交于 2021-02-08 04:03:14

问题


I'm using Android studio v 4.0 on windows 10 (1909) build. Every thing was working fine till last evening my code editor window just disappeared.

I'tried followings

  • Restart & invalidate cache
  • Check for updates
  • Reset default layout (shift+F12) [window -> Restore Default Layout]
  • Tried Dragging file into center to open (editor never appears but breadcrumb updates for each file selected or opened screenshot given below

Many other components are also effected like

  • Logcat showing nothing
  • Event Log showing nothing
  • Build & Sync showing nothing

One more strange thing is I'm unable to open settings [File -> Settings] (it shows nothing)

Here is the about section of my installed android studio

idea.log1 contains this exception

2020-06-27 12:26:01,693 [5987243]  ERROR - enapi.editor.impl.SettingsImpl - Error determining tab size 
java.lang.NullPointerException
    at com.intellij.openapi.editor.impl.SettingsImpl.getTabSize(SettingsImpl.java:377)
    at com.intellij.openapi.editor.ex.util.EditorUtil.getTabSize(EditorUtil.java:342)
    at com.intellij.openapi.editor.impl.view.EditorView.getTabSize(EditorView.java:547)
    at com.intellij.openapi.editor.impl.view.LogicalPositionCache.reset(LogicalPositionCache.java:75)
    at com.intellij.openapi.editor.impl.view.EditorView.reinitSettings(EditorView.java:344)
    at com.intellij.openapi.editor.impl.EditorImpl.<init>(EditorImpl.java:501)
    at com.intellij.openapi.editor.impl.EditorFactoryImpl.createEditor(EditorFactoryImpl.java:200)
    at com.intellij.openapi.editor.impl.EditorFactoryImpl.createViewer(EditorFactoryImpl.java:170)
    at com.intellij.execution.impl.ConsoleViewUtil.setupConsoleEditor(ConsoleViewUtil.java:56)
    at com.android.tools.idea.welcome.wizard.deprecated.ProgressStep.<init>(ProgressStep.java:61)
    at com.android.tools.idea.sdk.wizard.VmWizard$SetupProgressStep.<init>(VmWizard.java:132)
    at com.android.tools.idea.sdk.wizard.VmWizard$VmPath.init(VmWizard.java:251)
    at com.android.tools.idea.wizard.dynamic.DynamicWizardPath.attachToWizard(DynamicWizardPath.java:98)
    at com.android.tools.idea.wizard.dynamic.DynamicWizard.addPath(DynamicWizard.java:233)
    at com.android.tools.idea.sdk.wizard.VmWizard.<init>(VmWizard.java:68)
    at com.android.tools.idea.sdk.install.VmInstallListener.lambda$statusChanged$0(VmInstallListener.java:58)
    at com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:154)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:441)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:424)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:407)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
    at java.awt.EventQueue.access$500(EventQueue.java:98)
    at java.awt.EventQueue$3.run(EventQueue.java:715)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:908)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:781)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:424)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:698)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:423)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
    at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
    at java.awt.Dialog.show(Dialog.java:1077)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:708)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:433)
    at com.intellij.openapi.ui.DialogWrapper.doShow(DialogWrapper.java:1698)
    at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1657)
    at com.android.tools.idea.updater.UpdateInfoDialog$1.actionPerformed(UpdateInfoDialog.java:79)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
    at java.awt.Component.processMouseEvent(Component.java:6550)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3325)
    at java.awt.Component.processEvent(Component.java:6315)
    at java.awt.Container.processEvent(Container.java:2239)
    at java.awt.Component.dispatchEventImpl(Component.java:4899)
    at java.awt.Container.dispatchEventImpl(Container.java:2297)
    at java.awt.Component.dispatchEvent(Component.java:4721)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
    at java.awt.Container.dispatchEventImpl(Container.java:2283)
    at java.awt.Window.dispatchEventImpl(Window.java:2746)
    at java.awt.Component.dispatchEvent(Component.java:4721)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:766)
    at java.awt.EventQueue.access$500(EventQueue.java:98)
    at java.awt.EventQueue$3.run(EventQueue.java:715)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
    at java.awt.EventQueue$4.run(EventQueue.java:739)
    at java.awt.EventQueue$4.run(EventQueue.java:737)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:736)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:908)
    at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:846)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:778)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:424)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:687)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:423)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
    at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
    at java.awt.Dialog.show(Dialog.java:1077)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:708)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:433)
    at com.intellij.openapi.ui.DialogWrapper.doShow(DialogWrapper.java:1698)
    at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1657)
    at com.android.tools.idea.updater.SdkComponentSource.installUpdates(SdkComponentSource.java:108)
    at com.intellij.openapi.updateSettings.impl.UpdateChecker$showUpdateResult$runnable$3.invoke(UpdateChecker.kt:427)
    at com.intellij.openapi.updateSettings.impl.UpdateChecker$showUpdateResult$runnable$3.invoke(UpdateChecker.kt:55)
    at com.intellij.openapi.updateSettings.impl.UpdateChecker.showUpdateResult(UpdateChecker.kt:430)
    at com.intellij.openapi.updateSettings.impl.UpdateChecker.access$showUpdateResult(UpdateChecker.kt:55)
    at com.intellij.openapi.updateSettings.impl.UpdateChecker$doUpdateAndShowResult$1.run(UpdateChecker.kt:157)
    at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:309)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:441)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:424)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:407)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
    at java.awt.EventQueue.access$500(EventQueue.java:98)
    at java.awt.EventQueue$3.run(EventQueue.java:715)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:908)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:781)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:424)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:698)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:423)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
2020-06-27 12:26:01,696 [5987246]  ERROR - enapi.editor.impl.SettingsImpl - Android Studio 4.0  Build #AI-193.6911.18.40.6514223 
2020-06-27 12:26:01,696 [5987246]  ERROR - enapi.editor.impl.SettingsImpl - JDK: 1.8.0_242-release; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o 
2020-06-27 12:26:01,696 [5987246]  ERROR - enapi.editor.impl.SettingsImpl - OS: Windows 10 

回答1:


While going through logs found this.

ERROR - ij.psi.stubs.StubUpdatingIndex - Error indexing:jar://C:/Users/user/AppData/Local/Android/Sdk/platforms/android-29/android.jar!/android/media/midi/MidiDevice.class 
java.lang.NoClassDefFoundError: Could not initialize class name.kropp.intellij.makefile.psi.MakefileTypes

@Andy you were right, deleting following folders fixed the issue.

  1. C:\Users\user.AndroidStudio4.0\config\plugins
  2. C:\Users\user.AndroidStudio4.0\config\cache

Although on first start studio thrown an exception but on next restart every thing was fine



来源:https://stackoverflow.com/questions/62609701/android-studio-4-0-editor-window-is-gone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!