Android Studio开始失败

时间:2015-07-07 09:24:30

标签: android-studio startup internals

我刚刚安装了android studio。这是我第一次在一段时间后(显示加载栏后)运行它,它显示我这个错误。所以我在互联网上搜索,我尽我所能,(在Java上下载最新版本,重新安装程序并以管理员身份首次运行它,添加系统变量JAVA_HOME等)但仍然它显示了一个包含此信息的对话框:

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

java.lang.RuntimeException: java.lang.NullPointerException
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:178)
at com.intellij.idea.MainImpl$1$1$1.run(MainImpl.java:52)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
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$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
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.NullPointerException
at com.android.tools.idea.welcome.AndroidVirtualDevice.<init>(AndroidVirtualDevice.java:81)
at com.android.tools.idea.welcome.InstallComponentsPath.createComponentTree(InstallComponentsPath.java:89)
at com.android.tools.idea.welcome.InstallComponentsPath.init(InstallComponentsPath.java:215)
at com.android.tools.idea.wizard.DynamicWizardPath.attachToWizard(DynamicWizardPath.java:97)
at com.android.tools.idea.wizard.DynamicWizard.addPath(DynamicWizard.java:233)
at com.android.tools.idea.welcome.FirstRunWizard.init(FirstRunWizard.java:75)
at com.android.tools.idea.welcome.FirstRunWizardHost.setupWizard(FirstRunWizardHost.java:100)
at com.android.tools.idea.welcome.FirstRunWizardHost.getWelcomePanel(FirstRunWizardHost.java:92)
at com.intellij.openapi.wm.impl.welcomeScreen.WelcomeFrame.<init>(WelcomeFrame.java:68)
at com.intellij.openapi.wm.impl.welcomeScreen.WelcomeFrame.showNow(WelcomeFrame.java:173)
at com.intellij.idea.IdeaApplication$IdeStarter.main(IdeaApplication.java:302)
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:172)
... 16 more

现在我应该怎么做才能运行Android Studio?

3 个答案:

答案 0 :(得分:20)

打开安装Android Studio的文件夹:

  

例如:C:\ Program Files \ Android \ Android Studio \ bin

查找并修改idea.properties。您可以使用notepad ++或任何允许文本编辑的类似应用程序对其进行编辑。

将此行添加为文件中的最后一行:

disable.android.first.run=true

现在再次运行Android Studio。

答案 1 :(得分:13)

最好和最简单的解决方案是:

  1. 关闭Android Studio
  2. 关闭互联网连接并确保无误。
  3. 启动Android Studio。您会看到一个带有取消选项的弹出框。然后点击取消
  4. 下次您可以轻松启动Android工作室甚至连接到互联网..

答案 2 :(得分:0)

我有同样的问题。我只是重新启动计算机,因为计算机没有正确关闭。现在它的作品。希望这对其他人有帮助。