Android Studio 在开发多个项目后未启动并显示错误

Android Studio is not launching and showing an error after developing several projects

它显示了一个非常大的弹出式错误和这个修剪错误: 我之前使用过 Android Studio,现在由于我不知道的原因无法启动它。上次我使用 Android Studio 时,我只是对其进行了更新,并没有做太多的开发工作,也没有从事任何项目。 我在大约 2 周后启动了我的 AS,这就是我所看到的。

Internal error. Please report to https://code.google.com/p/android/issues

java.lang.NoClassDefFoundError: com/google/api/client/auth/oauth2/Credential
    at com.google.gct.login.GoogleLogin.createGoogleLoginState(GoogleLogin.java:503)
    at com.google.gct.login.GoogleLogin.access0(GoogleLogin.java:58)
    at com.google.gct.login.GoogleLogin$AndroidPreferencesOAuthDataStore.initializeUsers(GoogleLogin.java:708)
    at com.google.gct.login.GoogleLogin.getInstance(GoogleLogin.java:84)
    at com.google.gct.login.ui.GoogleLoginActionButton.<init>(GoogleLoginActionButton.java:40)
    at com.google.gct.login.ui.GoogleLoginAction.createCustomComponent(GoogleLoginAction.java:42)
    at com.intellij.openapi.actionSystem.impl.ActionToolbarImpl.getCustomComponent(ActionToolbarImpl.java:330)
    at com.intellij.openapi.actionSystem.impl.ActionToolbarImpl.fillToolBar(ActionToolbarImpl.java:310)
    at com.intellij.openapi.actionSystem.impl.ActionToolbarImpl.updateActionsImpl(ActionToolbarImpl.java:894)
    at com.intellij.openapi.actionSystem.impl.ActionToolbarImpl.access[=11=]0(ActionToolbarImpl.java:61)
    at com.intellij.openapi.actionSystem.impl.ActionToolbarImpl.updateActionsImpl(ActionToolbarImpl.java:168)
    at com.intellij.openapi.actionSystem.impl.ToolbarUpdater$MyUpdateRunnable.run(ToolbarUpdater.java:191)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.flushRequest(FocusManagerImpl.java:675)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.flushNow(FocusManagerImpl.java:656)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.flushIdleRequests(FocusManagerImpl.java:626)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.access0(FocusManagerImpl.java:60)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.run(FocusManagerImpl.java:522)
    at com.intellij.util.ui.UIUtil.invokeLaterIfNeeded(UIUtil.java:2379)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:500)
    at com.intellij.openapi.actionSystem.impl.ToolbarUpdater.updateActions(ToolbarUpdater.java:108)
    at com.intellij.openapi.actionSystem.impl.ToolbarUpdater.updateActions(ToolbarUpdater.java:93)
    at com.intellij.openapi.actionSystem.impl.ActionToolbarImpl.setMiniMode(ActionToolbarImpl.java:1268)
    at com.intellij.openapi.actionSystem.impl.ActionToolbarImpl.<init>(ActionToolbarImpl.java:184)
    at com.intellij.openapi.actionSystem.impl.ActionToolbarImpl.<init>(ActionToolbarImpl.java:147)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.createActionToolbar(ActionManagerImpl.java:471)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.createActionToolbar(ActionManagerImpl.java:466)
    at com.intellij.openapi.wm.impl.IdeRootPane.createToolbar(IdeRootPane.java:213)
    at com.intellij.openapi.wm.impl.IdeRootPane.updateToolbar(IdeRootPane.java:193)
    at com.intellij.openapi.wm.impl.IdeRootPane.<init>(IdeRootPane.java:99)
    at com.intellij.openapi.wm.impl.IdeFrameImpl.createRootPane(IdeFrameImpl.java:184)
    at com.intellij.openapi.wm.impl.IdeFrameImpl.<init>(IdeFrameImpl.java:96)
    at com.intellij.openapi.wm.impl.WindowManagerImpl.showFrame(WindowManagerImpl.java:514)
    at com.intellij.idea.IdeaApplication$IdeStarter.main(IdeaApplication.java:306)
    at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:172)
    at com.intellij.idea.MainImpl.run(MainImpl.java:52)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
    at java.awt.EventQueue.access0(EventQueue.java:97)
    at java.awt.EventQueue.run(EventQueue.java:697)
    at java.awt.EventQueue.run(EventQueue.java:691)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:714)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:362)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    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)
Caused by: java.lang.ClassNotFoundException: com.google.api.client.auth.oauth2.Credential PluginClassLoader[com.google.gct.login, 1.0]
    at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:68)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

刚刚通过 运行 帮助我卸载 Android Studio 的安装程序文件解决了这个问题,保持所有必要的库文件不变,并将其重新安装到新的空目录中。 现在一切正常。