Android Studio不在OSX PC上安装

时间:2016-05-12 19:43:14

标签: android-studio

我已经等了2个多小时才能在Mac上重新安装Android Studio。我已经尝试在上周重新安装此应用程序超过20次,并且应用程序每次都会挂起。我甚至让它坐了一整天但仍然没有。我没有收到任何错误消息。我检查了活动监视器,它没有被冻结。

按照Android Developer site的说明操作后,它会卡住几个小时,看不到任何结果。我在下面的图片中包含了一张图片(基本上就在开头)我已经多次重新启动计算机以查看是否会有所帮助,Android Studio会显示为可用的应用程序但是当我尝试使用它时,我得到了同一个屏幕。

enter image description here

详细说明:

  • Mac:OS X El Capitan版本10.11.4
  • Java版本:1.8.8_91
  • JAVA_HOME位置:Library / Java / JavaVirtualMachines / jdk1.8.0_91.jdk / Contents / Home
  • 在每次重新安装之前,我都使用App Cleaner来确保删除所有Android Studio文件。

有没有人知道问题是什么或可能是什么?有什么建议?我在Google上搜索了答案,但还没有找到任何有这类经历的人。

[UPDATE]

由于我不熟悉Mac OS X,我最终决定最好使用工作室可执行文件(Android Studio> Show Package Contents> MacOS> studio)。从那里,终端显示有很多错误。我已经包含以下信息。希望这是足够的信息来帮助。感谢。

2016-05-13 09:26:45.696 studio[3925:111495] Value of STUDIO_JDK: (null)
2016-05-13 09:26:45.700 studio[3925:111502] fullFileName is: /Applications/Android Studio.app/Contents/bin/studio.vmoptions
2016-05-13 09:26:45.700 studio[3925:111502] fullFileName exists: /Applications/Android Studio.app/Contents/bin/studio.vmoptions
2016-05-13 09:26:45.700 studio[3925:111502] Value of STUDIO_VM_OPTIONS is (null)
2016-05-13 09:26:45.700 studio[3925:111502] Processing VMOptions file at /Applications/Android Studio.app/Contents/bin/studio.vmoptions
2016-05-13 09:26:45.700 studio[3925:111502] Done
2016-05-13 09:26:45.700 studio[3925:111502] Processing VMOptions file at /Users/username/Library/Preferences/AndroidStudio2.1/studio.vmoptions
2016-05-13 09:26:45.700 studio[3925:111502] No content found
2016-05-13 09:26:45.700 studio[3925:111502] Processing VMOptions file at 
2016-05-13 09:26:45.700 studio[3925:111502] No content found
/Applications/Android Studio.app/Contents/bin/idea.properties: 'java.endorsed.dirs' already defined
log4j:WARN No appenders could be found for logger (io.netty.util.internal.logging.InternalLoggerFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Looking in classpath from com.intellij.util.lang.UrlClassLoader@29acfd6 for /com/sun/jna/darwin/libjnidispatch.jnilib
Found library resource at jar:file:/Applications/Android%20Studio.app/Contents/lib/jna.jar!/com/sun/jna/darwin/libjnidispatch.jnilib
Trying /Users/username/Library/Caches/AndroidStudio2.1/tmp/jna-1197065905/jna203230282572986310.tmp
Found jnidispatch at /Users/username/Library/Caches/AndroidStudio2.1/tmp/jna-1197065905/jna203230282572986310.tmp
Looking for library 'c'
Adding paths from jna.library.path: null
Trying libc.dylib
Found library 'c' at libc.dylib
Looking for library 'Foundation'
Adding paths from jna.library.path: null
Trying libFoundation.dylib
Adding system paths: [/usr/lib, /usr/lib]
Trying libFoundation.dylib
Looking for matching frameworks
Trying /System/Library/Frameworks/Foundation.framework/Foundation
Found library 'Foundation' at /System/Library/Frameworks/Foundation.framework/Foundation
[   4897]   WARN - oidStudioWelcomeScreenProvider - File /Users/username/.android/repositories.cfg could not be loaded. 
[   5573]   WARN - vdmanager.AvdManagerConnection - No Android SDK Found 
[   5617]   WARN - vdmanager.AvdManagerConnection - Missing file '/Users/username/.android/avd/Nexus_5X_API_23_x86.avd/config.ini'. 
[   5618]  ERROR - llij.ide.plugins.PluginManager - java.lang.NullPointerException 
java.lang.RuntimeException: java.lang.NullPointerException
    at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:204)
    at com.intellij.idea.MainImpl$1$1$1.run(MainImpl.java:52)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
    at java.awt.EventQueue.access$300(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:706)
    at java.awt.EventQueue$3.run(EventQueue.java:704)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:361)
    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)
Caused by: java.lang.NullPointerException
    at com.android.tools.idea.welcome.install.AndroidVirtualDevice.isSelectedByDefault(AndroidVirtualDevice.java:224)
    at com.android.tools.idea.welcome.install.InstallableComponent.updateState(InstallableComponent.java:124)
    at com.android.tools.idea.welcome.install.ComponentCategory.updateState(ComponentCategory.java:70)
    at com.android.tools.idea.welcome.wizard.InstallComponentsPath.init(InstallComponentsPath.java:238)
    at com.android.tools.idea.wizard.dynamic.DynamicWizardPath.attachToWizard(DynamicWizardPath.java:98)
    at com.android.tools.idea.wizard.dynamic.DynamicWizard.addPath(DynamicWizard.java:243)
    at com.android.tools.idea.welcome.wizard.FirstRunWizard.init(FirstRunWizard.java:94)
    at com.android.tools.idea.welcome.wizard.FirstRunWizardHost.setupWizard(FirstRunWizardHost.java:103)
    at com.android.tools.idea.welcome.wizard.FirstRunWizardHost.getWelcomePanel(FirstRunWizardHost.java:95)
    at com.intellij.openapi.wm.impl.welcomeScreen.FlatWelcomeFrame.<init>(FlatWelcomeFrame.java:94)
    at com.intellij.openapi.wm.impl.welcomeScreen.FlatWelcomeFrameProvider.createFrame(FlatWelcomeFrameProvider.java:29)
    at com.intellij.openapi.wm.impl.welcomeScreen.WelcomeFrame.showNow(WelcomeFrame.java:169)
    at com.intellij.idea.IdeaApplication$IdeStarter.main(IdeaApplication.java:340)
    at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:200)
    ... 16 more
[   5620]  ERROR - llij.ide.plugins.PluginManager - Android Studio 2.1.1  Build #AI-143.2821654 
[   5620]  ERROR - llij.ide.plugins.PluginManager - JDK: 1.7.0_79 
[   5620]  ERROR - llij.ide.plugins.PluginManager - VM: Java HotSpot(TM) 64-Bit Server VM 
[   5620]  ERROR - llij.ide.plugins.PluginManager - Vendor: Oracle Corporation 
[   5620]  ERROR - llij.ide.plugins.PluginManager - OS: Mac OS X 
[   5620]  ERROR - llij.ide.plugins.PluginManager - Last Action:

2 个答案:

答案 0 :(得分:0)

打开位于“/ Applications / Android \ Studio.app/Contents/bin/studio.vmoptions的文件 将内容更改为

aria-label

Xmx:指定Java虚拟机(JVM)的最大内存分配池。 Xms:指定初始内存分配池。

JVM以Xms的内存量开始,应该能够使用最大的Xmx内存量。

保存studio.vmoptions文件并重启Android Studio。

答案 1 :(得分:0)

在搜索到所有答案后(其他人已经similar issues但似乎没有真正的解决方案),我只有一个解决方案就是安装older version Android Studio。我安装了稳定的1.5.1版本,最终能够让Android Studio运行以启动一个新项目。从那里,我从同一个站点升级到2.1.1版本并且它起作用。

解决的步骤:

  1. 下载较旧的稳定版Android Studio
  2. 升级到最新的稳定版本以解决安全问题
  3. 感谢您的帮助。如果有人确实有修复而不是解决方法,请随意添加解决方案。