我有几个模块的Android Studio项目。现在,当我启动项目时,我收到了Gradle项目同步失败....
Failed to set up Android modules in project 'curiocity-app': [com.intellij.execution.application.ApplicationConfigurationType@9fbb092, com.intellij.execution.compound.CompoundRunConfigurationType@6b05465c, org.jetbrains.plugins.groovy.runner.GroovyScriptRunConfigurationType@274e78e8, com.intellij.execution.jar.JarApplicationConfigurationType@10e3db81, com.intellij.execution.jar.JarApplicationConfigurationType@10e3db81, com.intellij.execution.junit.JUnitConfigurationType@5f5ffad0, com.intellij.execution.junit.JUnitConfigurationType@5f5ffad0, com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationType@164b9e9b, com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationType@164b9e9b, com.intellij.execution.scratch.JavaScratchConfigurationType@3e99dd8c, com.intellij.execution.scratch.JavaScratchConfigurationType@3e99dd8c, com.intellij.execution.remote.RemoteConfigurationType@67a0326f, com.intellij.execution.remote.RemoteConfigurationType@67a0326f, com.theoryinpractice.testng.configuration.TestNGConfigurationType@464f4a8f, com.theoryinpractice.testng.configuration.testDiscovery.TestNGTestDiscoveryConfigurationType@7fa81658] loader: PluginClassLoader[org.jetbrains.android, 10.2.1], class com.android.tools.idea.run.AndroidRunConfigurationType
java.lang.AssertionError: [com.intellij.execution.application.ApplicationConfigurationType@9fbb092, com.intellij.execution.compound.CompoundRunConfigurationType@6b05465c, org.jetbrains.plugins.groovy.runner.GroovyScriptRunConfigurationType@274e78e8, com.intellij.execution.jar.JarApplicationConfigurationType@10e3db81, com.intellij.execution.jar.JarApplicationConfigurationType@10e3db81, com.intellij.execution.junit.JUnitConfigurationType@5f5ffad0, com.intellij.execution.junit.JUnitConfigurationType@5f5ffad0, com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationType@164b9e9b, com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationType@164b9e9b, com.intellij.execution.scratch.JavaScratchConfigurationType@3e99dd8c, com.intellij.execution.scratch.JavaScratchConfigurationType@3e99dd8c, com.intellij.execution.remote.RemoteConfigurationType@67a0326f, com.intellij.execution.remote.RemoteConfigurationType@67a0326f, com.theoryinpractice.testng.configuration.TestNGConfigurationType@464f4a8f, com.theoryinpractice.testng.configuration.testDiscovery.TestNGTestDiscoveryConfigurationType@7fa81658] loader: PluginClassLoader[org.jetbrains.android, 10.2.1], class com.android.tools.idea.run.AndroidRunConfigurationType
at com.intellij.execution.configurations.ConfigurationTypeUtil.findConfigurationType(ConfigurationTypeUtil.java:40)
at com.android.tools.idea.run.AndroidRunConfigurationType.getInstance(AndroidRunConfigurationType.java:68)
at com.android.tools.idea.gradle.customizer.android.RunConfigModuleCustomizer.customizeModule(RunConfigModuleCustomizer.java:52)
at com.android.tools.idea.gradle.customizer.android.RunConfigModuleCustomizer.customizeModule(RunConfigModuleCustomizer.java:41)
at com.android.tools.idea.gradle.service.AndroidGradleModelDataService.customizeModule(AndroidGradleModelDataService.java:322)
at com.android.tools.idea.gradle.service.AndroidGradleModelDataService.access$100(AndroidGradleModelDataService.java:83)
at com.android.tools.idea.gradle.service.AndroidGradleModelDataService$1.run(AndroidGradleModelDataService.java:157)
at com.intellij.openapi.command.WriteCommandAction$Simple.run(WriteCommandAction.java:166)
at com.intellij.openapi.application.RunResult.run(RunResult.java:35)
at com.intellij.openapi.command.WriteCommandAction$2$1.run(WriteCommandAction.java:114)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1010)
at com.intellij.openapi.command.WriteCommandAction$2.run(WriteCommandAction.java:111)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:124)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:99)
at com.intellij.openapi.command.WriteCommandAction.performWriteCommandAction(WriteCommandAction.java:108)
at com.intellij.openapi.command.WriteCommandAction.execute(WriteCommandAction.java:80)
at com.android.tools.idea.gradle.service.AndroidGradleModelDataService.doImport(AndroidGradleModelDataService.java:242)
at com.android.tools.idea.gradle.service.AndroidGradleModelDataService.importData(AndroidGradleModelDataService.java:119)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManager.doImportData(ProjectDataManager.java:254)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManager.importData(ProjectDataManager.java:151)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManager.importData(ProjectDataManager.java:197)
at com.android.tools.idea.gradle.util.Projects$1$1$1.run(Projects.java:136)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl.mergeRootsChangesDuring(ProjectRootManagerImpl.java:321)
at com.android.tools.idea.gradle.util.Projects$1$1.run(Projects.java:132)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1010)
at com.android.tools.idea.gradle.util.Projects$1.run(Projects.java:128)
at com.intellij.util.ui.UIUtil.invokeAndWaitIfNeeded(UIUtil.java:2382)
at com.android.tools.idea.gradle.util.Projects.populate(Projects.java:121)
at com.android.tools.idea.gradle.project.ProjectSetUpTask$2.run(ProjectSetUpTask.java:106)
at com.intellij.ide.startup.impl.StartupManagerImpl$7.run(StartupManagerImpl.java:372)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:337)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:321)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
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.defaultDispatchEvent(IdeEventQueue.java:866)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:654)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:381)
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)
有人能帮助我吗?
此致
答案 0 :(得分:20)
我的解决方案是在Android Studio中:
File=>Invalidate Caches/Restart...
。
此致