Android Studio启动失败并抛出堆栈跟踪,寻求排查方案
Android Studio启动崩溃问题求助
我正在学习开发Flutter应用,但Android Studio启动时持续崩溃。问题可复现,笔记本重装多个版本后仍存在。已按彻底卸载清理指南操作,问题未解决。Java输出2000+行错误日志,无从下手,恳请协助。
环境信息
- 操作系统:Windows 10
- Android Studio版本:2022.3.1.18
- Android Studio JRE:17.0.6+0-b2043.56-10027231 amd64 (JetBrains s.r.o.)
启动命令行报错
bin $ .\studio.bat CompileCommand: exclude com/intellij/openapi/vfs/impl/FilePartNodeRoot.trieDescend bool exclude = true 2023-08-14 12:02:31,575 [ 6419] WARN - #c.i.i.p.PluginManager - `include` is supported only on a root level ([row,col,system-id]: [176,5,"C:\Users\ms472\scoop\apps\android-studio\2022.3.1.18\plugins\Kotlin\lib\kotlin-idea.jar"]) 2023-08-14 12:02:32,374 [ 7218] SEVERE - #c.i.i.ApplicationLoader - Receiver class com.android.tools.idea.startup.AndroidPluginInitializer does not define or inherit an implementation of the resolved method 'abstract void beforeApplicationLoaded(com.intellij.openapi.application.Application, java.nio.file.Path)' of interface com.intellij.ide.ApplicationLoadListener. java.lang.AbstractMethodError: Receiver class com.android.tools.idea.startup.AndroidPluginInitializer does not define or inherit an implementation of the resolved method 'abstract void beforeApplicationLoaded(com.intellij.openapi.application.Application, java.nio.file.Path)' of interface com.intellij.ide.ApplicationLoadListener. at com.intellij.idea.ApplicationLoader.initConfigurationStore(ApplicationLoader.kt:387) at com.intellij.idea.ApplicationLoader$doInitApplication$4.invokeSuspend(ApplicationLoader.kt:85) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) 2023-08-14 12:02:32,396 [ 7240] SEVERE - #c.i.i.ApplicationLoader - Android Studio Giraffe | 2022.3.1 Build #AI-223.8836.35.2231.10406996 2023-08-14 12:02:32,396 [ 7240] SEVERE - #c.i.i.ApplicationLoader - JDK: 17.0.6; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o. 2023-08-14 12:02:32,402 [ 7246] SEVERE - #c.i.i.ApplicationLoader - OS: Windows 10 2023-08-14 12:02:32,455 [ 7299] SEVERE - #c.i.i.ApplicationLoader - com/intellij/configurationStore/StateStorageManager$DefaultImpls java.lang.NoClassDefFoundError: com/intellij/configurationStore/StateStorageManager$DefaultImpls at org.jetbrains.settingsRepository.IcsManager.beforeApplicationLoaded(IcsManager.kt:145) at org.jetbrains.settingsRepository.IcsApplicationLoadListener.beforeApplicationLoaded(IcsManager.kt:259) at com.intellij.idea.ApplicationLoader.initConfigurationStore(ApplicationLoader.kt:387) at com.intellij.idea.ApplicationLoader$doInitApplication$4.invokeSuspend(ApplicationLoader.kt:85) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
弹出窗口报错
Internal error. Please refer to https://code.google.com/p/android/issues java.lang.RuntimeException: call to AndroidStudioAnalytics before initialization at com.intellij.analytics.AndroidStudioAnalytics.getInstance(AndroidStudioAnalytics.java:38) at com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent.isAllowed(UsageStatisticsPersistenceComponent.java:137) at com.intellij.internal.statistic.utils.StatisticsUploadAssistant.isSendAllowed(StatisticsUploadAssistant.java:34) at com.android.tools.idea.stats.AndroidStudioStatisticsJobScheduler.componentsInitialized(AndroidStudioStatisticsJobScheduler.kt:38) at com.intellij.ide.ApplicationInitializedListener.execute$suspendImpl(ApplicationInitializedListener.kt:21) at com.intellij.ide.ApplicationInitializedListener.execute(ApplicationInitializedListener.kt) at com.intellij.idea.ApplicationLoader$callAppInitialized$1.invokeSuspend(ApplicationLoader.kt:436) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) ----- Your JRE: 17.0.6+0-b2043.56-10027231 amd64 (JetBrains s.r.o.) C:\Users\[REDACTED]\scoop\apps\android-studio\2022.3.1.18\jbr
解决步骤
1. 彻底清理残留配置
删除以下目录,确保卸载后无残留配置文件:
C:\Users\<你的用户名>\.AndroidStudio<版本号>C:\Users\<你的用户名>\.gradleC:\Users\<你的用户名>\.flutterC:\Users\<你的用户名>\AppData\Local\AndroidC:\Users\<你的用户名>\AppData\Roaming\Google\AndroidStudio<版本号>
2. 修复Scoop安装问题
从报错路径看你使用Scoop安装,可能存在文件损坏:
- 执行
scoop uninstall android-studio彻底卸载 - 删除
C:\Users\<你的用户名>\scoop\cache中Android Studio相关缓存文件 - 重新执行
scoop install android-studio,确保安装过程无网络中断
3. 禁用插件启动排查
怀疑插件冲突时,尝试禁用所有插件启动:
- 进入Android Studio安装目录的
bin文件夹 - 执行命令:
.\studio.bat --disable-plugins - 若能正常启动,逐个启用插件排查问题(重点关注Kotlin插件,报错中提到相关警告)
4. 替换内置JRE
尝试使用独立JDK替换内置JRE:
- 下载安装Oracle JDK 17版本
- 打开Android Studio安装目录
bin下的studio64.exe.vmoptions文件 - 添加一行配置:
-Djava.home=<你的JDK17安装路径>(例如-Djava.home=C:\Program Files\Java\jdk-17.0.6)
5. 更换旧版本测试
如果当前Giraffe版本问题持续,尝试安装前一个稳定版本(如Electric Eel 2022.1.1),确认是否为版本兼容性问题
内容的提问来源于stack exchange,提问作者ms4720
相关产品推荐
相关产品推荐

