我刚刚开始学习Android Kotlin基础知识课程。我已经安装了Android Studio并创建了HelloWorld项目。但是,在关闭Android Studio之后,无法再次打开它。
当我启动Android Studio时,出现初始屏幕,然后该应用程序启动并开始加载HelloWorld项目。在对话框中,报告它是“正在为'HelloWorld'加载组件”,然后是“正在加载模块”,然后整个Android Studio应用程序关闭并消失。
idea.log文件包含在下面
我正在从(android-studio-ide-191.5791312-windows.exe)运行Windows 10(64位)和Android Studio。我计算机上唯一的Java是12.0.2版(这是Google Kotlin Bootcamp课程的推荐版本。
我尝试设置JAVA_HOME和JDK_HOME环境变量,但这并不能解决我的问题。
我尝试重新启动,卸载并重新安装Android Studio失败
这是Windows控制台中的相关信息。
C:\Program Files\Android\Android Studio\bin>ver
Microsoft Windows [Version 10.0.17134.829]
C:\Program Files\Android\Android Studio\bin>java -version
java version "12.0.2" 2019-07-16
Java(TM) SE Runtime Environment (build 12.0.2+10)
Java HotSpot(TM) 64-Bit Server VM (build 12.0.2+10, mixed mode, sharing)
C:\Program Files\Android\Android Studio\bin>javac -version
javac 12.0.2
更新
根据一个建议,我从计算机上卸载了Android Studio和Java。我从我的环境变量中删除了对Java和Android的所有引用,重新启动,并尝试全新安装标准的Android Studio。不幸的是,只要创建项目,Studio就会退出并消失。我将提供环境变量的屏幕截图,包括路径的详细信息以及安装Android Studio后的输出。
完整的idea.log在下面。
2019-08-29 15:28:19,001 [e-1483-b03] INFO - .startup.AndroidSdkInitializer - Found Studio home directory at: 'C:\Program Files\Android\Android Studio'
2019-08-29 15:28:19,001 [e-1483-b03] INFO - .startup.AndroidSdkInitializer - Looking for Android SDK at 'C:/Program Files/Android/Android Studio/sdk'
2019-08-29 15:28:19,002 [e-1483-b03] INFO - .startup.AndroidSdkInitializer - Looking for Android SDK at 'C:/Program Files/Android/sdk'
2019-08-29 15:28:19,002 [e-1483-b03] INFO - .startup.AndroidSdkInitializer - Unable to locate SDK within the Android studio installation.
2019-08-29 15:28:19,003 [e-1483-b03] INFO - .startup.AndroidSdkInitializer - ANDROID_HOME environment variable: 'C:\Users\XXXX\AppData\Local\Android\Sdk'
2019-08-29 15:28:19,038 [e-1483-b03] INFO - rd.FirstRunWizardFrameProvider - Overriding welcome frame to be resizable
2019-08-29 15:28:19,151 [oader Pool] INFO - .openapi.application.Preloader - com.intellij.openapi.actionSystem.impl.ActionPreloader took 2530 ms
2019-08-29 15:28:19,215 [oader Pool] INFO - dk.ClangTidyInspectionProvider - Clang-tidy inspection is enabled.}
2019-08-29 15:28:20,262 [oader Pool] INFO - .openapi.application.Preloader - com.intellij.ide.ui.search.SearchableOptionPreloader took 1110 ms
2019-08-29 15:28:20,799 [oader Pool] INFO - .openapi.application.Preloader - com.intellij.codeInsight.completion.CompletionPreloader took 536 ms
2019-08-29 15:28:20,808 [oader Pool] INFO - .openapi.application.Preloader - com.intellij.ide.actions.GotoClassPresentationUpdater took 8 ms
2019-08-29 15:28:22,216 [rImpl Pool] WARN - ess.util.ProgressIndicatorBase - This progress indicator is indeterminate, this may lead to visual inconsistency. Please call setIndeterminate(false) before you start progress.
com.intellij.util.download.impl.FileDownloaderImpl$ConcurrentTasksProgressManager.updateFraction(FileDownloaderImpl.java:339)
2019-08-29 15:28:24,705 [e-1483-b03] INFO - ellij.project.impl.ProjectImpl - 166 project components initialized in 500 ms
2019-08-29 15:28:24,706 [e-1483-b03] INFO - le.impl.ModuleManagerComponent - 0 module(s) loaded in 0 ms
2019-08-29 15:28:24,774 [e-1483-b03] INFO - testKnownPluginVersionProvider - 'gradle' plugin missing from the offline Maven repo, will use default 3.5.0
2019-08-29 15:28:24,788 [e-1483-b03] INFO - testKnownPluginVersionProvider - 'gradle' plugin missing from the offline Maven repo, will use default 3.5.0
2019-08-29 15:28:24,790 [e-1483-b03] INFO - idea.project.IndexingSuspender - Subscribing project 'Project 'C:\Users\XXXX\AndroidStudioProjects\MyApplication3' My Application' to indexing suspender events (com.android.tools.idea.project.IndexingSuspender@6632463a)
2019-08-29 15:28:24,792 [e-1483-b03] INFO - idea.project.IndexingSuspender - Consuming IndexingSuspender activation event: TEMPLATE_RENDERING_STARTED
2019-08-29 15:28:24,792 [e-1483-b03] INFO - a.gradle.util.BatchUpdatesUtil - Starting batch update for project: Project 'C:\Users\XXXX\AndroidStudioProjects\MyApplication3' My Application
2019-08-29 15:28:24,813 [e-1483-b03] INFO - testKnownPluginVersionProvider - 'gradle' plugin missing from the offline Maven repo, will use default 3.5.0
2019-08-29 15:28:25,447 [e-1483-b03] INFO - rojectCodeStyleSettingsManager - Initialized from default code style settings.
2019-08-29 15:28:25,499 [cessToken]] WARN - BasedStripTrailingSpacesFilter - No current project is given, trailing spaces will be stripped later (postponed). File: C:/Users/Ryan.RYANW10/AndroidStudioProjects/MyApplication3/build.gradle
2019-08-29 15:28:25,554 [cessToken]] WARN - BasedStripTrailingSpacesFilter - No current project is given, trailing spaces will be stripped later (postponed). File: C:/Users/Ryan.RYANW10/AndroidStudioProjects/MyApplication3/settings.gradle
2019-08-29 15:28:25,578 [cessToken]] WARN - BasedStripTrailingSpacesFilter - No current project is given, trailing spaces will be stripped later (postponed). File: C:/Users/Ryan.RYANW10/AndroidStudioProjects/MyApplication3/gradle.properties
2019-08-29 15:28:25,693 [cessToken]] WARN - BasedStripTrailingSpacesFilter - No current project is given, trailing spaces will be stripped later (postponed). File: C:/Users/Ryan.RYANW10/AndroidStudioProjects/MyApplication3/local.properties
2019-08-29 15:28:25,767 [cessToken]] WARN - BasedStripTrailingSpacesFilter - No current project is given, trailing spaces will be stripped later (postponed). File: C:/Users/Ryan.RYANW10/AndroidStudioProjects/MyApplication3/settings.gradle
2019-08-29 15:28:25,797 [cessToken]] WARN - BasedStripTrailingSpacesFilter - No current project is given, trailing spaces will be stripped later (postponed). File: C:/Users/Ryan.RYANW10/AndroidStudioProjects/MyApplication3/app/build.gradle
2019-08-29 15:28:25,884 [cessToken]] WARN - BasedStripTrailingSpacesFilter - No current project is given, trailing spaces will be stripped later (postponed). File: C:/Users/Ryan.RYANW10/AndroidStudioProjects/MyApplication3/app/src/androidTest/java/com/example/myapplication/ExampleInstrumentedTest.kt
2019-08-29 15:28:25,918 [cessToken]] WARN - BasedStripTrailingSpacesFilter - No current project is given, trailing spaces will be stripped later (postponed). File: C:/Users/Ryan.RYANW10/AndroidStudioProjects/MyApplication3/app/src/test/java/com/example/myapplication/ExampleUnitTest.kt
2019-08-29 15:28:26,310 [e-1483-b03] WARN - templates.RepositoryUrlManager - RepositoryUrlManager#getLibraryRevision called from the UI thread. Using local cache to avoid network requests
2019-08-29 15:28:26,318 [e-1483-b03] WARN - templates.RepositoryUrlManager - RepositoryUrlManager#getLibraryRevision called from the UI thread. Using local cache to avoid network requests
2019-08-29 15:28:26,318 [e-1483-b03] WARN - templates.RepositoryUrlManager - RepositoryUrlManager#getLibraryRevision called from the UI thread. Using local cache to avoid network requests
2019-08-29 15:28:26,318 [e-1483-b03] WARN - templates.RepositoryUrlManager - RepositoryUrlManager#getLibraryRevision called from the UI thread. Using local cache to avoid network requests
2019-08-29 15:28:26,319 [e-1483-b03] WARN - templates.RepositoryUrlManager - RepositoryUrlManager#getLibraryRevision called from the UI thread. Using local cache to avoid network requests
2019-08-29 15:28:26,319 [e-1483-b03] WARN - templates.RepositoryUrlManager - RepositoryUrlManager#getLibraryRevision called from the UI thread. Using local cache to avoid network requests
2019-08-29 15:28:26,322 [cessToken]] WARN - BasedStripTrailingSpacesFilter - No current project is given, trailing spaces will be stripped later (postponed). File: C:/Users/Ryan.RYANW10/AndroidStudioProjects/MyApplication3/app/build.gradle
2019-08-29 15:28:26,498 [cessToken]] WARN - BasedStripTrailingSpacesFilter - No current project is given, trailing spaces will be stripped later (postponed). File: C:/Users/Ryan.RYANW10/AndroidStudioProjects/MyApplication3/app/src/main/java/com/example/myapplication/MainActivity.kt
2019-08-29 15:28:26,518 [e-1483-b03] WARN - templates.RepositoryUrlManager - RepositoryUrlManager#getLibraryRevision called from the UI thread. Using local cache to avoid network requests
2019-08-29 15:28:26,520 [cessToken]] WARN - BasedStripTrailingSpacesFilter - No current project is given, trailing spaces will be stripped later (postponed). File: C:/Users/Ryan.RYANW10/AndroidStudioProjects/MyApplication3/app/build.gradle
2019-08-29 15:28:26,537 [e-1483-b03] INFO - idea.project.IndexingSuspender - Consuming IndexingSuspender deactivation event: TEMPLATE_RENDERING_FINISHED
2019-08-29 15:28:26,537 [e-1483-b03] INFO - a.gradle.util.BatchUpdatesUtil - Finishing batch update for project: Project 'C:\Users\XXXX\AndroidStudioProjects\MyApplication3' My Application
2019-08-29 15:28:26,758 [e-1483-b03] INFO - artup.AndroidStudioInitializer - Failed to disable 'org.intellij.plugins.intelliLang.inject.groovy.GrConcatenationInjector'
2019-08-29 15:28:26,870 [d thread 2] INFO - j.ide.script.IdeStartupScripts - 0 startup script(s) found
threadDump文件太大,无法包含在文本中,因此我已将其链接
答案 0 :(得分:1)
尝试删除C:\ Users \ XXX \ AppData \ Local \ Android文件夹和C:\ Users \ xxx.AndroidStudiox.x,然后重新打开并安装所有需要安装的内容(SDK),该文件可能已修复您的问题。
我根据此行对此表示怀疑:
信息-j.ide.script.IdeStartupScripts-找到0个启动脚本