我的Intellij设置存在问题。我能够从命令行成功构建,但是当我尝试刷新我的构建文件时,它永远不会完成,只是说'Gradle项目同步正在进行中......'。当我拖尾日志时,我明白了:
INFO - s.plugins.gradle.GradleManager - Instructing gradle to use java from /Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home
INFO - s.plugins.gradle.GradleManager - Instructing gradle to use java from /Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home
INFO - .project.GradleExecutionHelper - Passing command-line args to Gradle Tooling API: [--init-script, /private/var/folders/nj/qb8hxhjx6ng8bp5c0070dt3m0000gn/T/ijinit9082569265104558481.gradle]
INFO - indexing.UnindexedFilesUpdater - Indexable files iterated in 2 ms
INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 0 files to update
INFO - indexing.UnindexedFilesUpdater - Unindexed files update done in 0 ms
ERROR - plication.impl.ApplicationImpl - null
java.lang.AssertionError: null
at com.intellij.openapi.diagnostic.DefaultLogger.error(DefaultLogger.java:66)
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:132)
at com.intellij.util.ui.UIUtil.invokeAndWaitIfNeeded(UIUtil.java:2077)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.executeOnEdt(ExternalSystemApiUtil.java:377)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.executeProjectChangeAction(ExternalSystemApiUtil.java:359)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$MyMultiExternalProjectRefreshCallback.onSuccess(ExternalSystemUtil.java:760)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$2.execute(ExternalSystemUtil.java:434)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3$2.run(ExternalSystemUtil.java:483)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:471)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$8.run(ProgressManagerImpl.java:380)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:695)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)
Caused by: java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1126)
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1103)
at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1326)
at com.intellij.util.ui.UIUtil.invokeAndWaitIfNeeded(UIUtil.java:2074)
... 19 more
Caused by: org.gradle.tooling.model.UnsupportedMethodException: Unsupported method: Dependencies.getJars().
The version of Gradle you connect to does not support that method.
To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively, you can ignore this exception and read other information from the model.
at org.gradle.tooling.model.internal.Exceptions.unsupportedMethod(Exceptions.java:33)
at org.gradle.tooling.internal.adapter.ProtocolToModelAdapter$InvocationHandlerImpl.invoke(ProtocolToModelAdapter.java:240)
at com.sun.proxy.$Proxy128.getJars(Unknown Source)
at com.android.tools.idea.gradle.dependency.Dependency.populate(Dependency.java:99)
at com.android.tools.idea.gradle.dependency.Dependency.extractFrom(Dependency.java:88)
at com.android.tools.idea.gradle.customizer.android.DependenciesModuleCustomizer.setUpDependencies(DependenciesModuleCustomizer.java:50)
at com.android.tools.idea.gradle.customizer.android.DependenciesModuleCustomizer.setUpDependencies(DependenciesModuleCustomizer.java:43)
at com.android.tools.idea.gradle.customizer.AbstractDependenciesModuleCustomizer.customizeModule(AbstractDependenciesModuleCustomizer.java:57)
at com.android.tools.idea.gradle.service.AndroidProjectDataService.customizeModule(AndroidProjectDataService.java:149)
at com.android.tools.idea.gradle.service.AndroidProjectDataService.access$100(AndroidProjectDataService.java:58)
at com.android.tools.idea.gradle.service.AndroidProjectDataService$1.execute(AndroidProjectDataService.java:103)
at com.intellij.openapi.externalSystem.util.DisposeAwareProjectChange.run(DisposeAwareProjectChange.java:36)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil$5$1.run(ExternalSystemApiUtil.java:364)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:984)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil$5.run(ExternalSystemApiUtil.java:361)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.executeOnEdt(ExternalSystemApiUtil.java:374)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.executeProjectChangeAction(ExternalSystemApiUtil.java:359)
at com.android.tools.idea.gradle.service.AndroidProjectDataService.importData(AndroidProjectDataService.java:94)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManager.importData(ProjectDataManager.java:90)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManager.importData(ProjectDataManager.java:74)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManager.importData(ProjectDataManager.java:98)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManager.importData(ProjectDataManager.java:74)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManager.importData(ProjectDataManager.java:98)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$MyMultiExternalProjectRefreshCallback$1$1.run(ExternalSystemUtil.java:766)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl.mergeRootsChangesDuring(ProjectRootManagerImpl.java:329)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$MyMultiExternalProjectRefreshCallback$1.execute(ExternalSystemUtil.java:763)
at com.intellij.openapi.externalSystem.util.DisposeAwareProjectChange.run(DisposeAwareProjectChange.java:36)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil$5$1.run(ExternalSystemApiUtil.java:364)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:984)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil$5.run(ExternalSystemApiUtil.java:361)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:524)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
ERROR - plication.impl.ApplicationImpl - IntelliJ IDEA 13.1.4 Build #IU-135.1230
ERROR - plication.impl.ApplicationImpl - JDK: 1.6.0_65
ERROR - plication.impl.ApplicationImpl - VM: Java HotSpot(TM) 64-Bit Server VM
ERROR - plication.impl.ApplicationImpl - Vendor: Apple Inc.
ERROR - plication.impl.ApplicationImpl - OS: Mac OS X
ERROR - plication.impl.ApplicationImpl - Last Action: ExternalSystem.RefreshAllProjects
任何人都有任何想法,我似乎无法弄清楚我所看到的任何一个错误的来源。
答案 0 :(得分:0)
如果您在撰写本文时想要使用Android Gradle插件的v0.13,则应使用Android Studio 0.8.11或更高版本。虽然IntelliJ内置了Android插件,但它并不经常更新,也不是最新版本,并且最近添加了对0.13 Gradle插件的支持。