简体   繁体   English

Android Studio启动:无法加载项目 - java.lang.NullPointerException

[英]Android Studio Startup : Cannot Load Project - java.lang.NullPointerException

I am relatively new to Android Studio (and to StackOverflow =D ) and recently started having problems with startup. 我对Android Studio(以及StackOverflow = D)相对较新,最近开始遇到启动问题。

Whenever I launch Android Studio for the first time (ie after PC start / restart) all I get in the Android Studio project window is a dialog saying " Cannot Load Project - java.lang.NullPointerException ". 每当我第一次启动Android Studio时(即在PC启动/重启后),我在Android Studio项目窗口中的所有内容都是一个对话框,上面写着“ 无法加载项目 - java.lang.NullPointerException ”。

When I click OK (no other option) there is nothing displayed in the project window. 当我单击“确定”(没有其他选项)时,项目窗口中没有显示任何内容。 I got a red pop-up in the top right saying - IDE Internal Error Occurred, click to view details . 我在右上角有一个红色弹出窗口 - 发生IDE内部错误,点击查看详细信息 Here is the error message I got from that: 这是我从中得到的错误消息:

null
java.lang.NullPointerException
at com.intellij.openapi.updateSettings.impl.UpdateChecker.updateAndShowResult(UpdateChecker.kt:126)
at com.intellij.openapi.updateSettings.impl.CheckForUpdateAction.actionPerformed(CheckForUpdateAction.java:40)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:191)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:312)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:958)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:282)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:110)
at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:513)
at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:45)
at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:533)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:857)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:654)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:386)
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)

Got no idea what all this means... I am using the latest versions of the softwares on Windows 10 x64: 不知道这一切意味着什么...我在Windows 10 x64上使用最新版本的软件:

Android Studio 2.2.3
Build #AI-145.3537739, built on December 2, 2016
JRE: 1.8.0_76-release-b03 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

Wondering why this is happening and how I might resolve it? 想知道为什么会这样,以及我如何解决它? By the way, this only happens for the first time , but I can't close it (unresponsive), so I have to End Task via Task Manager. 顺便说一句, 这只是第一次发生 ,但我不能关闭它(没有响应),所以我必须通过任务管理器结束任务。 When I start it again it does work fine, but gives the same error upon next PC start... 当我再次启动它确实工作正常,但在下一次 PC启动时给出相同的错误...

(I did a lot of searching about this on the internet but couldn't find any reference to such a problem except that people had older outdated versions of software - but I am running latest stable versions of all softwares - which is why I couldn't find anything) (我在互联网上做了很多关于这个问题的搜索但没有找到任何关于这个问题的参考,除了人们有较旧的软件版本 - 但我正在运行所有软件的最新稳定版本 - 这就是为什么我无法'什么都找不到)

Any help would be appreciated =) 任何帮助将不胜感激=)

I faced the same problem too after an update and windows restart. 更新和Windows重启后我也遇到了同样的问题。 Not sure, but it could be due to a bug in the recent version of Android Studio. 不确定,但可能是由于最近版本的Android Studio中存在错误。

The temporary solution that works for me is to kill ("end process") the Android Studio executable (studio64.exe) from Task Manager, and run it again. 对我有用的临时解决方案是从任务管理器中杀死(“结束进程”)Android Studio可执行文件(studio64.exe),然后再次运行它。

Once it starts working well, update to the latest version. 一旦开始运行良好,请更新到最新版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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