繁体   English   中英

Windows 10上的Android Studio 2.3永远在第一个Gradle构建中等待

[英]Android Studio 2.3 on Windows 10 wait forever on first gradle build

我将Android Studio更新为使用JDK 1.8.121在Windows 10上发布2.3。 当我尝试创建一个新项目时,Android Studio开始在此屏幕上永远等待。 请注意,当我尝试打开现有项目时也会发生这种情况。

在此处输入图片说明

有人遇到我同样的问题吗?

Android Studio日志为:

2017-03-04 13:20:27,045 [      0]   INFO -        #com.intellij.idea.Main - ------------------------------------------------------ IDE STARTED ------------------------------------------------------ 
2017-03-04 13:20:27,076 [     31]   INFO -        #com.intellij.idea.Main - IDE: Android Studio (build #AI-162.3764568, 24 Feb 2017 00:00) 
2017-03-04 13:20:27,076 [     31]   INFO -        #com.intellij.idea.Main - OS: Windows 10 (10.0, amd64) 
2017-03-04 13:20:27,076 [     31]   INFO -        #com.intellij.idea.Main - JRE: 1.8.0_112-release-b06 (JetBrains s.r.o) 
2017-03-04 13:20:27,076 [     31]   INFO -        #com.intellij.idea.Main - JVM: 25.112-b06 (OpenJDK 64-Bit Server VM) 
2017-03-04 13:20:27,078 [     33]   INFO -        #com.intellij.idea.Main - JVM Args: -Xms256m -Xmx1280m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -da -Djna.nosys=true -Djna.boot.library.path= -Djna.debug_load=true -Djna.debug_load.jna=true -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Didea.paths.selector=AndroidStudio2.3 -Didea.platform.prefix=AndroidStudio -Didea.jre.check=true -Djb.vmOptionsFile=C:\MyProgramFiles\AndroidStudio\bin\studio64.exe.vmoptions -Xbootclasspath/a:C:\MyProgramFiles\AndroidStudio\lib\boot.jar -Didea.jre.check=false -XX:ErrorFile=C:\Users\xcesco\java_error_in___product_uc___%p.log -XX:HeapDumpPath=C:\Users\xcesco\java_error_in___product_uc__.hprof 
2017-03-04 13:20:27,078 [     33]   INFO -        #com.intellij.idea.Main - ext: C:\MyProgramFiles\AndroidStudio\jre\jre\lib\ext: [access-bridge-64.jar, cldrdata.jar, dnsns.jar, jaccess.jar, localedata.jar, meta-index, nashorn.jar, sunec.jar, sunjce_provider.jar, sunmscapi.jar, sunpkcs11.jar, zipfs.jar] 
2017-03-04 13:20:27,078 [     33]   INFO -        #com.intellij.idea.Main - JNU charset: Cp1252 
2017-03-04 13:20:27,109 [     64]   INFO -        #com.intellij.idea.Main - JNA library loaded (64-bit) in 31 ms 
2017-03-04 13:20:27,111 [     66]   INFO - penapi.util.io.win32.IdeaWin32 - Native filesystem for Windows is operational 
2017-03-04 13:20:27,112 [     67]   INFO -        #com.intellij.idea.Main - Using "FocusKiller" library to prevent focus stealing. 
2017-03-04 13:20:27,135 [     90]   INFO -     #com.intellij.util.ui.JBUI - UI scale factor: 1.0 
2017-03-04 13:20:27,626 [    581]   INFO - llij.ide.plugins.PluginManager - Cannot find optional descriptor duplicates-groovy.xml 
2017-03-04 13:20:27,965 [    920]   INFO - llij.ide.plugins.PluginManager - 35 plugins initialized in 547 ms 
2017-03-04 13:20:27,971 [    926]   INFO - llij.ide.plugins.PluginManager - Loaded bundled plugins: Android Games (1.0), Android NDK Support (1.0), Android Support (10.2.3), App Links Assistant (0.1), CVS Integration (11), Copyright (8.1), Coverage (162.2228.14), EditorConfig (162.2228.14), Firebase App Indexing (0.1), Firebase Services (0.1), Firebase Testing (1.0), Git Integration (8.1), GitHub (162.2228.14), Google Cloud Tools Core (0.2.8), Google Cloud Tools For Android Studio (0.2.8), Google Developers Samples (0.3.1), Google Login (1.0), Google Services (0.1), Gradle (162.2228.14), Groovy (9.0), I18n for Java (162.2228.14), IDEA CORE (162.2228.14), IntelliLang (8.0), JUnit (1.0), Java Bytecode Decompiler (162.2228.14), NDK WorkspaceManager Support (1.0), Properties Support (162.2228.14), Settings Repository (162.2228.14), Subversion Integration (1.1), Task Management (1.0), Terminal (0.1), Test Recorder (1.0), TestNG-J (8.0), YAML (162.2228.14), hg4idea (10.0) 
2017-03-04 13:20:29,480 [   2435]   INFO - ellij.util.io.PagedFileStorage - lower=100; upper=500; buffer=10; max=1217 
2017-03-04 13:20:29,508 [   2463]   INFO - pl.local.NativeFileWatcherImpl - Starting file watcher: C:\MyProgramFiles\AndroidStudio\bin\fsnotifier64.exe 
2017-03-04 13:20:29,520 [   2475]   INFO - pl.local.NativeFileWatcherImpl - Native file watcher is operational. 
2017-03-04 13:20:29,883 [   2838]   INFO -     #com.intellij.util.ui.JBUI - UI scale factor changed: 1.0 
2017-03-04 13:20:30,126 [   3081]   INFO - rains.ide.BuiltInServerManager - built-in server started, port 63342 
2017-03-04 13:20:30,151 [   3106]   INFO - gs.impl.UpdateCheckerComponent - channel: release 
2017-03-04 13:20:30,188 [   3143]   INFO - il.indexing.FileBasedIndexImpl - Index exts enumerated:25 
2017-03-04 13:20:30,190 [   3145]   INFO - il.indexing.FileBasedIndexImpl - Index scheduled:2 
2017-03-04 13:20:30,201 [   3156]   INFO - tellij.psi.stubs.StubIndexImpl - All stub exts enumerated:6 
2017-03-04 13:20:30,202 [   3157]   INFO - tellij.psi.stubs.StubIndexImpl - stub exts update scheduled:0 
2017-03-04 13:20:30,228 [   3183]   INFO - j.ide.script.IdeStartupScripts - 0 startup script(s) found 
2017-03-04 13:20:30,624 [   3579]   INFO - pl$FileIndexDataInitialization - Initialization done:434 
2017-03-04 13:20:30,673 [   3628]   INFO - ellij.project.impl.ProjectImpl - 20 project components initialized in 339 ms 
2017-03-04 13:20:30,674 [   3629]   INFO - le.impl.ModuleManagerComponent - 0 module(s) loaded in 0 ms 
2017-03-04 13:20:30,759 [   3714]   INFO - exImpl$StubIndexInitialization - Initialization done:134 
2017-03-04 13:20:31,855 [   4810]   INFO - plication.impl.ApplicationImpl - 85 application components initialized in 4437 ms 
2017-03-04 13:20:31,868 [   4823]   INFO - .intellij.idea.IdeaApplication - App initialization took 6375 ms 
2017-03-04 13:20:32,098 [   5053]   INFO - .openapi.application.Preloader - Finished preloading com.intellij.openapi.actionSystem.impl.ActionPreloader@562cbd36 
2017-03-04 13:20:32,731 [   5686]   INFO - dea.updater.SdkComponentSource - Downloading file:/C:/MyProgramFiles/AndroidStudio/plugins/sdk-updates/offline-repo/offline-repo.xml 
2017-03-04 13:20:32,840 [   5795]   INFO - dea.updater.SdkComponentSource - Downloading https://dl.google.com/android/repository/repository2-1.xml 
2017-03-04 13:20:33,074 [   6029]   WARN - dea.updater.SdkComponentSource - File C:\Users\xcesco\.android\repositories.cfg could not be loaded. 
2017-03-04 13:20:33,076 [   6031]   INFO - dea.updater.SdkComponentSource - Downloading https://dl.google.com/android/repository/addons_list-3.xml 
2017-03-04 13:20:33,159 [   6114]   INFO - dea.updater.SdkComponentSource - Downloading https://dl.google.com/android/repository/sys-img/android/sys-img2-1.xml 
2017-03-04 13:20:33,219 [   6174]   INFO - .openapi.application.Preloader - Finished preloading com.intellij.ide.ui.search.SearchableOptionPreloader@4c4f7c8a 
2017-03-04 13:20:33,336 [   6291]   INFO - dea.updater.SdkComponentSource - Downloading https://dl.google.com/android/repository/sys-img/android-wear/sys-img2-1.xml 
2017-03-04 13:20:33,427 [   6382]   INFO - dea.updater.SdkComponentSource - Downloading https://dl.google.com/android/repository/sys-img/android-tv/sys-img2-1.xml 
2017-03-04 13:20:33,522 [   6477]   INFO - dea.updater.SdkComponentSource - Downloading https://dl.google.com/android/repository/sys-img/google_apis/sys-img2-1.xml 
2017-03-04 13:20:33,621 [   6576]   INFO - dea.updater.SdkComponentSource - Downloading https://dl.google.com/android/repository/addon2-1.xml 
2017-03-04 13:20:33,805 [   6760]   INFO - dea.updater.SdkComponentSource - Downloading https://dl.google.com/android/repository/glass/addon2-1.xml 
2017-03-04 13:20:33,875 [   6830]   INFO - dea.updater.SdkComponentSource - Downloading https://dl.google.com/android/repository/extras/intel/addon2-1.xml 
2017-03-04 13:20:45,790 [  18745]   INFO - CompilerWorkspaceConfiguration - Available processors: 8 
2017-03-04 13:20:46,004 [  18959]   INFO - ellij.project.impl.ProjectImpl - 138 project components initialized in 474 ms 
2017-03-04 13:20:46,005 [  18960]   INFO - le.impl.ModuleManagerComponent - 0 module(s) loaded in 0 ms 
2017-03-04 13:20:47,131 [  20086]   INFO - i.vcs.changes.ChangeListWorker - default list not found when copy 
2017-03-04 13:20:47,131 [  20086]   INFO - i.vcs.changes.ChangeListWorker - default list not found when copy in original object too 
2017-03-04 13:20:47,248 [  20203]   INFO - e.project.sync.GradleSyncState - Started sync with Gradle for project 'My Application'. 
2017-03-04 13:20:47,353 [  20308]   INFO - s.plugins.gradle.GradleManager - Instructing gradle to use java from C:/MyProgramFiles/AndroidStudio/jre 
2017-03-04 13:20:47,366 [  20321]   INFO - s.plugins.gradle.GradleManager - Instructing gradle to use java from C:/MyProgramFiles/AndroidStudio/jre 
2017-03-04 13:20:48,194 [  21149]   INFO - xecution.GradleExecutionHelper - Passing command-line args to Gradle Tooling API: [-Djava.awt.headless=true, -Pandroid.injected.build.model.only=true, -Pandroid.injected.build.model.only.advanced=true, -Pandroid.injected.invoked.from.ide=true, --init-script, C:\Users\xcesco\AppData\Local\Temp\asLocalRepo3634.gradle, --init-script, C:\Users\xcesco\AppData\Local\Temp\ijinit179.gradle] 

我找到了解决您问题的方法。 基本上是由嵌入式android studio jdk来解决的,解决方案太简单了,只需转到Project Structure-> SDK Location-> unchecked。使用嵌入式jdk并在我的情况下选择独立jdk的路径(Windows)

C:\Program Files\Java\jdk1.8.0_131

经过数小时的尝试后,我发现的唯一解决方案是重新安装Android Studio 2.2.3的先前版本。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM