JetPack:“Gradle同步失败:已经处理掉了!”

wbgh16ku  于 2022-11-14  发布在  其他
关注(0)|答案(1)|浏览(228)

我在Debian 9.0 Stretch桌面上使用Android Studio3.1.x已经有一段时间了,没有出现任何问题。
我最近安装了Android Studio3.2 Canary 14(也称为 JetPack)。按照JetPack的 * 入门 * 说明,我创建了一个支持Kotlin的新项目,并选择 Activity & Fragment+ViewModel
当我尝试同步新创建的项目(即 * 将项目与Gradle文件同步 *)时,同步失败
查看日志时,我发现一个Assert失败(见下文):

2018-05-12 16:44:59,062 [ thread 43]   WARN - ea.IdeaSyncPopulateProjectTask - Sync failed: Already disposed! 
    java.lang.RuntimeException: java.lang.AssertionError: Already disposed!
        at com.intellij.openapi.application.impl.LaterInvocator.invokeAndWait(LaterInvocator.java:179)
        at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:651)
        at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:656)
        at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.executeOnEdt(ExternalSystemApiUtil.java:480)
        at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.executeProjectChangeAction(ExternalSystemApiUtil.java:469)
        at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.dispose(ProjectDataManagerImpl.java:442)
        at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.importData(ProjectDataManagerImpl.java:163)
        at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.importData(ProjectDataManagerImpl.java:221)
        at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.importData(ProjectDataManagerImpl.java:228)
        at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask.doPopulateProject(IdeaSyncPopulateProjectTask.java:120)
        at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask.populate(IdeaSyncPopulateProjectTask.java:97)
        at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask.access$000(IdeaSyncPopulateProjectTask.java:39)
        at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask$1.run(IdeaSyncPopulateProjectTask.java:86)
        at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:750)
        at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
        at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580)
        at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
        at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
        at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
        at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:395)
        at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:305)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.AssertionError: Already disposed!
        at com.intellij.openapi.components.impl.ComponentManagerImpl.disposeComponents(ComponentManagerImpl.java:128)
        at com.intellij.openapi.module.impl.ModuleImpl.dispose(ModuleImpl.java:145)
        at com.intellij.openapi.util.Disposer$1.execute(Disposer.java:48)
        at com.intellij.openapi.util.Disposer$1.execute(Disposer.java:44)
        at com.intellij.openapi.util.objectTree.ObjectTree.executeActionWithRecursiveGuard(ObjectTree.java:169)
        at com.intellij.openapi.util.objectTree.ObjectTree.executeUnregistered(ObjectTree.java:181)
        at com.intellij.openapi.util.objectTree.ObjectTree.executeAll(ObjectTree.java:140)
        at com.intellij.openapi.util.Disposer.dispose(Disposer.java:129)
        at com.intellij.openapi.util.Disposer.dispose(Disposer.java:125)
        at com.intellij.openapi.module.impl.ModuleManagerImpl$ModuleModelImpl.dispose(ModuleManagerImpl.java:895)
        at com.intellij.openapi.externalSystem.service.project.AbstractIdeModifiableModelsProvider.dispose(AbstractIdeModifiableModelsProvider.java:467)
        at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl$3.execute(ProjectDataManagerImpl.java:445)
        at com.intellij.openapi.externalSystem.util.DisposeAwareProjectChange.run(DisposeAwareProjectChange.java:36)
        at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1010)
        at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.lambda$executeProjectChangeAction$6(ExternalSystemApiUtil.java:469)
        at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315)
        at com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:156)
        at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:447)
        at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:431)
        at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:415)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
        at java.awt.EventQueue.access$500(EventQueue.java:98)
        at java.awt.EventQueue$3.run(EventQueue.java:715)
        at java.awt.EventQueue$3.run(EventQueue.java:709)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
        at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:779)
        at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:720)
        at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:395)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
2018-05-12 16:44:59,063 [ thread 43]   INFO - e.project.sync.GradleSyncState - Gradle sync failed: Already disposed! (1 s 170 ms)

我试过重新安装所有的东西,删除.gradle目录等;没有欢乐。
网上似乎没有提到这个问题,所以我猜这是我的设置的特定问题(与JetPack的已知问题相比),但我不知道在哪里寻找或如何处理它。
有人能解释一下吗?

dnph8jn4

dnph8jn41#

1.使缓存失效.../使缓存失效并重新启动
1.取消第一次同步
1.打开新项目
1.迁移到新项目

相关问题