SDK 管理器崩溃

SDK Manager crashes

我使用以下命令打开 android studio 1.0.1

sudo ./studio.sh

安装顺利,我开始添加sdk包http://developer.android.com/sdk/installing/adding-packages.html 但是每当我尝试 运行 sdk 管理器时,它都会显示一个带有进度条的提示 "Starting sdk manager",然后在 2 或 3 秒后关闭。

Java版本:

java version "1.7.0_76"
Java(TM) SE Runtime Environment (build 1.7.0_76-b13)
Java HotSpot(TM) Server VM (build 24.76-b04, mixed mode)

我也有 openjdk6 和 openjdk7,但我使用 Oracle 的 Java,因为当我将这些 openjdk 设置为默认值时,我开始遇到问题。

我通过 idea.properties 搜索了日志文件并找到了。它在我的 home/user_name/.AndroidStudio/system/log 目录下被命名为 idea.log 并且包含以下

2015-02-03 09:47:24,757 [      0]   INFO -        #com.intellij.idea.Main - ------------------------------------------------------ IDE STARTED ------------------------------------------------------ 
2015-02-03 09:47:24,773 [     16]   INFO -        #com.intellij.idea.Main - IDE: Android Studio (build #AI-135.1641136, 11 Dec 2014 00:00) 
2015-02-03 09:47:24,773 [     16]   INFO -        #com.intellij.idea.Main - OS: Linux (3.13.0-44-generic, i386) 
2015-02-03 09:47:24,773 [     16]   INFO -        #com.intellij.idea.Main - JRE: 1.7.0_76-b13 (Oracle Corporation) 
2015-02-03 09:47:24,773 [     16]   INFO -        #com.intellij.idea.Main - JVM: 24.76-b04 (Java HotSpot(TM) Server VM) 
2015-02-03 09:47:24,837 [     80]   INFO -        #com.intellij.idea.Main - JVM Args: -Xms128m -Xmx512m -XX:MaxPermSize=250m -XX:ReservedCodeCacheSize=64m -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Djna.nosys=true -Djna.boot.library.path= -Djna.debug_load=true -Djna.debug_load.jna=true -Djsse.enableSNIExtension=false -XX:+UseCodeCacheFlushing -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -Dawt.useSystemAAFontSettings=lcd -Djb.vmOptionsFile=./studio.vmoptions -Xbootclasspath/a:./../lib/boot.jar -Didea.paths.selector=AndroidStudio -Didea.platform.prefix=AndroidStudio -Djb.restart.code=88 
2015-02-03 09:47:25,060 [    303]   INFO -        #com.intellij.idea.Main - JNA library loaded (32-bit) in 223 ms 
2015-02-03 09:47:25,192 [    435]   INFO -        #com.intellij.idea.Main - Snappy library loaded (1.0.5) in 102 ms 
2015-02-03 09:47:25,192 [    435]   INFO -        #com.intellij.idea.Main - 2015-02-03 09:46:22 [Patch] Original patch does not exist: /tmp/jetbrains.patch.jar.androidstudio

2015-02-03 09:47:31,615 [   6858]   INFO - .intellij.idea.IdeaApplication - WM detected: Mutter (Muffin) 
2015-02-03 09:47:33,561 [   8804]   INFO - llij.ide.plugins.PluginManager - Cannot find optional descriptor intellilang-python-support.xml 
2015-02-03 09:47:36,584 [  11827]   INFO - llij.ide.plugins.PluginManager - 21 plugins initialized in 4408 ms 
2015-02-03 09:47:36,601 [  11844]   INFO - llij.ide.plugins.PluginManager - Loaded bundled plugins: Android Support (10.1.0.1), CVS Integration (11), Commander (1.0.0), Copyright (8.1), Git Integration (8.1), GitHub, Google Cloud Tools For Android Studio (0.2.8), Google Login (1.0), Gradle, Groovy (9.0), I18n for Java, IDEA CORE, IntelliLang (8.0), JUnit (1.0), Maven Integration, Properties Support, Subversion Integration (1.1), Task Management (1.0), Terminal (0.1), TestNG-J (8.0), hg4idea (10.0) 
2015-02-03 09:47:41,914 [  17157]   INFO - ellij.vfs.persistent.FSRecords - Marking VFS as corrupted 
2015-02-03 09:47:41,918 [  17161]   INFO - ellij.util.io.PagedFileStorage - lower=100; upper=200; buffer=10; max=502530048 
2015-02-03 09:47:42,031 [  17274]   INFO - api.vfs.impl.local.FileWatcher - Starting file watcher: /home/ralf/android-studio/bin/fsnotifier 
2015-02-03 09:47:42,095 [  17338]   INFO - api.vfs.impl.local.FileWatcher - Native file watcher is operational. 
2015-02-03 09:47:42,302 [  17545]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/other.xml file is null 
2015-02-03 09:47:42,390 [  17633]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/project.default.xml file is null 
2015-02-03 09:47:42,732 [  17975]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/filetypes.xml file is null 
2015-02-03 09:47:43,630 [  18873]   INFO - .history.utils.LocalHistoryLog - local history version mismatch (was: 0, expected: 5), rebuilding... 
2015-02-03 09:47:43,630 [  18873]   INFO - .history.utils.LocalHistoryLog - FS has been rebuild, rebuilding local history... 
2015-02-03 09:47:43,710 [  18953]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/path.macros.xml file is null 
2015-02-03 09:47:43,718 [  18961]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/ui.lnf.xml file is null 
2015-02-03 09:47:43,757 [  19000]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/options.xml file is null 
2015-02-03 09:47:44,091 [  19334]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/notifications.xml file is null 
2015-02-03 09:47:44,113 [  19356]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/usage.statistics.xml file is null 
2015-02-03 09:47:44,118 [  19361]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/statistics.application.usages.xml file is null 
2015-02-03 09:47:45,344 [  20587]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/keymap.xml file is null 
2015-02-03 09:47:46,281 [  21524]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/window.manager.xml file is null 
2015-02-03 09:47:46,347 [  21590]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/abbreviations.xml file is null 
2015-02-03 09:47:46,531 [  21774]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/ide.general.xml file is null 
2015-02-03 09:47:51,350 [  26593]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/stubIndex.xml file is null 
2015-02-03 09:47:51,466 [  26709]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/editor.xml file is null 
2015-02-03 09:47:51,470 [  26713]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/macros.xml file is null 
2015-02-03 09:47:51,475 [  26718]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/quicklists.xml file is null 
2015-02-03 09:47:52,369 [  27612]   INFO - tellij.xml.Html5SchemaProvider - HTML5_SCHEMA_LOCATION = /home/ralf/android-studio/lib/idea.jar!/resources/html5-schema/html5.rnc 
2015-02-03 09:47:52,369 [  27612]   INFO - tellij.xml.Html5SchemaProvider - XHTML5_SCHEMA_LOCATION = /home/ralf/android-studio/lib/idea.jar!/resources/html5-schema/xhtml5.rnc 
2015-02-03 09:47:52,369 [  27612]   INFO - tellij.xml.Html5SchemaProvider - CHARS_DTD_LOCATION = /home/ralf/android-studio/lib/idea.jar!/resources/html5-schema/html5chars.ent 
2015-02-03 09:47:53,832 [  29075]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/colors.scheme.xml file is null 
2015-02-03 09:47:53,888 [  29131]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/editor.codeinsight.xml file is null 
2015-02-03 09:47:54,976 [  30219]   INFO -                  TestNG Runner - Create TestNG Template Configuration 
2015-02-03 09:47:55,374 [  30617]   INFO - ellij.project.impl.ProjectImpl - 21 project components initialized in 2967 ms 
2015-02-03 09:47:55,375 [  30618]   INFO - le.impl.ModuleManagerComponent - 0 module(s) loaded in 0 ms 
2015-02-03 09:47:56,075 [  31318]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/jdk.table.xml file is null 
2015-02-03 09:47:56,250 [  31493]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/code.style.schemes.xml file is null 
2015-02-03 09:47:56,453 [  31696]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/debugger.renderers.xml file is null 
2015-02-03 09:47:56,485 [  31728]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/terminal.xml file is null 
2015-02-03 09:47:57,610 [  32853]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/studio.build.statistics.xml file is null 
2015-02-03 09:47:57,624 [  32867]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/androidStudioFirstRun.xml file is null 
2015-02-03 09:47:57,638 [  32881]   INFO - pl.stores.ApplicationStoreImpl - 85 application components initialized in 20614 ms 
2015-02-03 09:47:57,681 [  32924]   INFO - .intellij.idea.IdeaApplication - App initialization took 92269 ms 
2015-02-03 09:48:02,710 [  37953]   WARN - ateSettings.impl.UpdateChecker - Connection failed. Please check your network connection and try again. 
2015-02-03 09:48:19,965 [  55208]   INFO - droidStudioSpecificInitializer - Found Studio home directory at: '/home/ralf/android-studio' 
2015-02-03 09:48:19,965 [  55208]   INFO - droidStudioSpecificInitializer - Looking for Android SDK at '/home/ralf/android-studio/sdk' 
2015-02-03 09:48:19,966 [  55209]   INFO - droidStudioSpecificInitializer - Looking for Android SDK at '/home/ralf/sdk' 
2015-02-03 09:48:19,966 [  55209]   INFO - droidStudioSpecificInitializer - Unable to locate SDK within the Android studio installation. 
2015-02-03 09:48:19,966 [  55209]   INFO - droidStudioSpecificInitializer - Checking if ANDROID_HOME is set: 'ANDROID_HOME' is 'null' 
2015-02-03 09:48:19,966 [  55209]   INFO - droidStudioSpecificInitializer - Unable to locate last SDK used by Android tools 
2015-02-03 11:09:29,505 [4924748]   INFO -        #com.intellij.idea.Main - ------------------------------------------------------ IDE SHUTDOWN ------------------------------------------------------ 
2015-02-03 11:09:29,653 [4924896]   WARN - api.vfs.impl.local.FileWatcher - Watcher terminated with exit code 129 
2015-02-03 11:09:30,213 [4925456]   INFO - il.indexing.FileBasedIndexImpl - START INDEX SHUTDOWN 
2015-02-03 11:09:30,261 [4925504]   INFO - il.indexing.FileBasedIndexImpl - END INDEX SHUTDOWN 
2015-02-03 11:09:30,261 [4925504]   INFO - stubs.SerializationManagerImpl - START StubSerializationManager SHUTDOWN 
2015-02-03 11:09:30,261 [4925504]   INFO - stubs.SerializationManagerImpl - END StubSerializationManager SHUTDOWN 
2015-02-03 11:09:30,261 [4925504]   INFO - .history.utils.LocalHistoryLog - Purging local history... 
2015-02-03 11:09:30,335 [4925578]   INFO - .history.utils.LocalHistoryLog - Local history storage successfully closed. 
2015-02-03 11:09:30,335 [4925578]   INFO - newvfs.persistent.PersistentFS - VFS dispose started 
2015-02-03 11:09:30,336 [4925579]   INFO - newvfs.persistent.PersistentFS - VFS dispose completed 
2015-02-07 02:17:54,774 [      0]   INFO -        #com.intellij.idea.Main - ------------------------------------------------------ IDE STARTED ------------------------------------------------------ 
2015-02-07 02:17:54,798 [     24]   INFO -        #com.intellij.idea.Main - IDE: Android Studio (build #AI-135.1641136, 11 Dec 2014 00:00) 
2015-02-07 02:17:54,798 [     24]   INFO -        #com.intellij.idea.Main - OS: Linux (3.13.0-45-generic, i386) 
2015-02-07 02:17:54,798 [     24]   INFO -        #com.intellij.idea.Main - JRE: 1.7.0_76-b13 (Oracle Corporation) 
2015-02-07 02:17:54,798 [     24]   INFO -        #com.intellij.idea.Main - JVM: 24.76-b04 (Java HotSpot(TM) Server VM) 
2015-02-07 02:17:54,801 [     27]   INFO -        #com.intellij.idea.Main - JVM Args: -Xms128m -Xmx512m -XX:MaxPermSize=250m -XX:ReservedCodeCacheSize=64m -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Djna.nosys=true -Djna.boot.library.path= -Djna.debug_load=true -Djna.debug_load.jna=true -Djsse.enableSNIExtension=false -XX:+UseCodeCacheFlushing -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -Dawt.useSystemAAFontSettings=lcd -Djb.vmOptionsFile=./studio.vmoptions -Xbootclasspath/a:./../lib/boot.jar -Didea.paths.selector=AndroidStudio -Didea.platform.prefix=AndroidStudio -Djb.restart.code=88 
2015-02-07 02:17:54,846 [     72]   INFO -        #com.intellij.idea.Main - JNA library loaded (32-bit) in 45 ms 
2015-02-07 02:17:55,184 [    410]   INFO -        #com.intellij.idea.Main - Snappy library loaded (1.0.5) in 338 ms 
2015-02-07 02:17:55,184 [    410]   INFO -        #com.intellij.idea.Main - 2015-02-07 02:17:51 [Patch] Original patch does not exist: /tmp/jetbrains.patch.jar.androidstudio

2015-02-07 02:17:55,901 [   1127]   INFO - .intellij.idea.IdeaApplication - WM detected: Mutter (Muffin) 
2015-02-07 02:17:57,768 [   2994]   INFO - llij.ide.plugins.PluginManager - Cannot find optional descriptor intellilang-python-support.xml 
2015-02-07 02:17:59,971 [   5197]   INFO - llij.ide.plugins.PluginManager - 21 plugins initialized in 3545 ms 
2015-02-07 02:17:59,972 [   5198]   INFO - llij.ide.plugins.PluginManager - Loaded bundled plugins: Android Support (10.1.0.1), CVS Integration (11), Commander (1.0.0), Copyright (8.1), Git Integration (8.1), GitHub, Google Cloud Tools For Android Studio (0.2.8), Google Login (1.0), Gradle, Groovy (9.0), I18n for Java, IDEA CORE, IntelliLang (8.0), JUnit (1.0), Maven Integration, Properties Support, Subversion Integration (1.1), Task Management (1.0), Terminal (0.1), TestNG-J (8.0), hg4idea (10.0) 
2015-02-07 02:18:01,856 [   7082]   INFO - ellij.util.io.PagedFileStorage - lower=100; upper=200; buffer=10; max=502530048 
2015-02-07 02:18:02,224 [   7450]   INFO - api.vfs.impl.local.FileWatcher - Starting file watcher: /home/ralf/android-studio/bin/fsnotifier 
2015-02-07 02:18:02,257 [   7483]   INFO - api.vfs.impl.local.FileWatcher - Native file watcher is operational. 
2015-02-07 02:18:03,195 [   8421]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/notifications.xml file is null 
2015-02-07 02:18:03,737 [   8963]   INFO - lij.diagnostic.DebugLogManager - Set DEBUG for the following categories: [] 
2015-02-07 02:18:04,251 [   9477]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/window.manager.xml file is null 
2015-02-07 02:18:05,364 [  10590]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/macros.xml file is null 
2015-02-07 02:18:05,371 [  10597]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/quicklists.xml file is null 
2015-02-07 02:18:06,051 [  11277]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/terminal.xml file is null 
2015-02-07 02:18:06,527 [  11753]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/studio.build.statistics.xml file is null 
2015-02-07 02:18:06,545 [  11771]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/androidStudioFirstRun.xml file is null 
2015-02-07 02:18:06,566 [  11792]   INFO - pl.stores.ApplicationStoreImpl - 85 application components initialized in 6303 ms 
2015-02-07 02:18:06,614 [  11840]   INFO - .intellij.idea.IdeaApplication - App initialization took 14088 ms 
2015-02-07 02:18:23,605 [  28831]   INFO - droidStudioSpecificInitializer - Found Studio home directory at: '/home/ralf/android-studio' 
2015-02-07 02:18:23,605 [  28831]   INFO - droidStudioSpecificInitializer - Looking for Android SDK at '/home/ralf/android-studio/sdk' 
2015-02-07 02:18:23,605 [  28831]   INFO - droidStudioSpecificInitializer - Looking for Android SDK at '/home/ralf/sdk' 
2015-02-07 02:18:23,605 [  28831]   INFO - droidStudioSpecificInitializer - Unable to locate SDK within the Android studio installation. 
2015-02-07 02:18:23,605 [  28831]   INFO - droidStudioSpecificInitializer - Checking if ANDROID_HOME is set: 'ANDROID_HOME' is 'null' 
2015-02-07 02:18:23,606 [  28832]   INFO - droidStudioSpecificInitializer - Unable to locate last SDK used by Android tools 
2015-02-07 02:18:24,401 [  29627]   INFO -                  TestNG Runner - Create TestNG Template Configuration 
2015-02-07 02:18:24,410 [  29636]   INFO -                  TestNG Runner - Create TestNG Template Configuration 
2015-02-07 02:18:24,499 [  29725]   INFO - ellij.project.impl.ProjectImpl - 21 project components initialized in 561 ms 
2015-02-07 02:18:24,499 [  29725]   INFO - le.impl.ModuleManagerComponent - 0 module(s) loaded in 0 ms 
2015-02-07 02:19:52,421 [ 117647]   INFO -        #com.intellij.idea.Main - ------------------------------------------------------ IDE SHUTDOWN ------------------------------------------------------ 
2015-02-07 02:19:52,435 [ 117661]   INFO - il.indexing.FileBasedIndexImpl - START INDEX SHUTDOWN 
2015-02-07 02:19:52,463 [ 117689]   INFO - il.indexing.FileBasedIndexImpl - END INDEX SHUTDOWN 
2015-02-07 02:19:52,471 [ 117697]   INFO - stubs.SerializationManagerImpl - START StubSerializationManager SHUTDOWN 
2015-02-07 02:19:52,471 [ 117697]   INFO - stubs.SerializationManagerImpl - END StubSerializationManager SHUTDOWN 
2015-02-07 02:19:52,471 [ 117697]   INFO - .history.utils.LocalHistoryLog - Purging local history... 
2015-02-07 02:19:52,480 [ 117706]   WARN - api.vfs.impl.local.FileWatcher - Watcher terminated with exit code 130 
2015-02-07 02:19:52,485 [ 117711]   INFO - .history.utils.LocalHistoryLog - Local history storage successfully closed. 
2015-02-07 02:19:52,485 [ 117711]   INFO - newvfs.persistent.PersistentFS - VFS dispose started 
2015-02-07 02:19:52,504 [ 117730]   INFO - newvfs.persistent.PersistentFS - VFS dispose completed 
Looking for Android SDK at '/home/ralf/android-studio/sdk' 
2015-02-03 09:48:19,966 [  55209]   INFO - droidStudioSpecificInitializer - Looking for Android SDK at '/home/ralf/sdk' 
2015-02-03 09:48:19,966 [  55209]   INFO - droidStudioSpecificInitializer - Unable to locate SDK within the Android studio installation. 
2015-02-03 09:48:19,966 [  55209]   INFO - droidStudioSpecificInitializer - Checking if ANDROID_HOME is set: 'ANDROID_HOME' is 'null' 

Intellij找不到你的sdk位置,你应该引入ANDROID_HOME指向sdk的环境变量