Android Studio for Mac在启动时崩溃

时间:2017-03-21 18:36:01

标签: macos android-studio crash startup yosemite

我下载了Android Studio 2.3并已安装。然后我尝试打开应用程序,它确实"意外退出"甚至在开始之前。

这是我为$ /Applications/Android\ Studio.app/Contents/MacOS/studio获得的结果。

2017-03-23 19:40:03.869 studio[5988:353457] Value of STUDIO_JDK: /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk
2017-03-23 19:40:03.871 studio[5988:353457] allVms required 1.8*,1.8+
2017-03-23 19:40:03.873 studio[5988:353468] fullFileName is: /Applications/Android Studio.app/Contents/bin/studio.vmoptions
2017-03-23 19:40:03.874 studio[5988:353468] fullFileName exists: /Applications/Android Studio.app/Contents/bin/studio.vmoptions
2017-03-23 19:40:03.874 studio[5988:353468] Value of STUDIO_VM_OPTIONS is (null)
2017-03-23 19:40:03.874 studio[5988:353468] Processing VMOptions file at /Applications/Android Studio.app/Contents/bin/studio.vmoptions
2017-03-23 19:40:03.875 studio[5988:353468] Done
2017-03-23 19:40:03.875 studio[5988:353468] Processing VMOptions file at /Users/chevindu/Library/Preferences/AndroidStudio2.3/studio.vmoptions
2017-03-23 19:40:03.877 studio[5988:353468] No content found
2017-03-23 19:40:03.877 studio[5988:353468] Processing VMOptions file at 
2017-03-23 19:40:03.878 studio[5988:353468] No content found
/Applications/Android Studio.app/Contents/bin/idea.properties: 'java.endorsed.dirs' already defined
Looking in classpath from com.intellij.util.lang.UrlClassLoader@5c29bfd 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/chevindu/Library/Caches/AndroidStudio2.3/tmp/jna7329126360829887390.tmp
Found jnidispatch at /Users/chevindu/Library/Caches/AndroidStudio2.3/tmp/jna7329126360829887390.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
[   9207]   WARN - s.RepoProgressIndicatorAdapter - java.io.FileNotFoundException: /private/var/folders/m3/9bsc3x6s2vq8z50zh24c1g9w0000gn/T/StudioDownloadersys-img2-1.xml (No such file or directory) 
[   9995]   WARN - s.RepoProgressIndicatorAdapter - File /Users/chevindu/.android/repositories.cfg could not be loaded. 
[  10051]   WARN - dea.updater.SdkComponentSource - java.io.FileNotFoundException: /private/var/folders/m3/9bsc3x6s2vq8z50zh24c1g9w0000gn/T/StudioDownloader1addon2-1.xml (No such file or directory) 
[  10051]   WARN - dea.updater.SdkComponentSource - File /Users/chevindu/.android/repositories.cfg could not be loaded. 
[  10117]   WARN - vdmanager.AvdManagerConnection - No Android SDK Found 
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fff87706f72, pid=5988, tid=0x0000000000000513
#
# JRE version: OpenJDK Runtime Environment (8.0_112-b06) (build 1.8.0_112-release-b06)
# Java VM: OpenJDK 64-Bit Server VM (25.112-b06 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C  [libsystem_c.dylib+0xf72]  strlen+0x12
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/chevindu/java_error_in_studio_5988.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Abort trap: 6

我安装了Java(TM)SE运行时环境(版本1.8.0_121-b13)并运行了OS X Yosemite 10.10.5。

这是我为$ printenv获得的结果。

TERM_PROGRAM=Apple_Terminal
SHELL=/bin/bash
TERM=xterm-256color
TMPDIR=/var/folders/m3/9bsc3x6s2vq8z50zh24c1g9w0000gn/T/Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.AvWjd1Ew1S/Render
TERM_PROGRAM_VERSION=343.7
TERM_SESSION_ID=CEC1537E-091C-4099-9C40-D933AF826E27
USER=chevindu
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.l8xDQvW92n/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
PWD=/Users/chevindu
LANG=en_US.UTF-8
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
SHLVL=1
HOME=/Users/chevindu
STUDIO_JDK=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk
LOGNAME=chevindu
_=/usr/bin/printenv

您可以在here/Users/chevindu/java_error_in_studio_5988.log处阅读错误日志。

非常感谢任何有关此事的帮助。

2 个答案:

答案 0 :(得分:1)

已知错误?

这可能与known bug有关,根据one comment在下一个次要版本(2.3.1)中修复。

此问题中描述了解决方法和临时解决方案,包括降级java或下载和替换Android Studio应用程序中的二进制文件。 (我个人没有尝试过,但如果它对您有用,请随时直接评论该问题。)

答案 1 :(得分:0)

我下载了另一个版本,从Contents / macos / studio复制了studio,然后将其粘贴到新的错误版本中;我替换了Studio文件。

效果很好。