Unresolved service: class org.jetbrains.kotlin.resolve.jvm.JavaDescriptorResolver


#1

When i try to sync my project with gradle files i get this error:

Unresolved service: class org.jetbrains.kotlin.resolve.jvm.JavaDescriptorResolver

It is a completely empty fresh project and im on latest Kotlin version.

Here is the stack trace:

Unresolved service: class org.jetbrains.kotlin.resolve.jvm.JavaDescriptorResolver
java.lang.IllegalArgumentException: Unresolved service: class org.jetbrains.kotlin.resolve.jvm.JavaDescriptorResolver
	at org.jetbrains.kotlin.container.DslKt.getService(Dsl.kt:42)
	at org.jetbrains.kotlin.resolve.jvm.JvmAnalyzerFacade$createResolverForModule$moduleClassResolver$1.invoke(JvmAnalyzerFacade.kt:122)
	at org.jetbrains.kotlin.resolve.jvm.JvmAnalyzerFacade$createResolverForModule$moduleClassResolver$1.invoke(JvmAnalyzerFacade.kt:46)
	at org.jetbrains.kotlin.load.java.lazy.ModuleClassResolverImpl.resolveClass(ModuleClassResolver.kt:37)
	at org.jetbrains.kotlin.load.java.lazy.types.JavaTypeResolver.computeTypeConstructor(JavaTypeResolver.kt:132)
	at org.jetbrains.kotlin.load.java.lazy.types.JavaTypeResolver.computeSimpleJavaClassifierType(JavaTypeResolver.kt:114)
	at org.jetbrains.kotlin.load.java.lazy.types.JavaTypeResolver.transformJavaClassifierType(JavaTypeResolver.kt:90)
	at org.jetbrains.kotlin.load.java.lazy.types.JavaTypeResolver.transformJavaType(JavaTypeResolver.kt:52)
	at org.jetbrains.kotlin.load.java.lazy.descriptors.LazyJavaClassDescriptor$LazyJavaClassTypeConstructor.computeSupertypes(LazyJavaClassDescriptor.kt:178)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$1.invoke(AbstractTypeConstructor.kt:35)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$1.invoke(AbstractTypeConstructor.kt:22)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedLazyValue.invoke(LockBasedStorageManager.java:323)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedNotNullLazyValue.invoke(LockBasedStorageManager.java:370)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor.computeNeighbours(AbstractTypeConstructor.kt:57)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor.access$computeNeighbours(AbstractTypeConstructor.kt:22)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$3$resultWithoutCycles$1.invoke(AbstractTypeConstructor.kt:44)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$3$resultWithoutCycles$1.invoke(AbstractTypeConstructor.kt:22)
	at org.jetbrains.kotlin.resolve.SupertypeLoopCheckerImpl$findLoopsInSupertypesAndDisconnect$graph$1.getNeighbors(findLoopsInSupertypes.kt:33)
	at org.jetbrains.kotlin.resolve.SupertypeLoopCheckerImpl$findLoopsInSupertypesAndDisconnect$graph$1.getNeighbors(findLoopsInSupertypes.kt:26)
	at org.jetbrains.kotlin.utils.DFS.doDfs(DFS.java:98)
	at org.jetbrains.kotlin.utils.DFS.dfs(DFS.java:27)
	at org.jetbrains.kotlin.resolve.FindLoopsInSupertypes.isReachable(findLoopsInSupertypes.kt:53)
	at org.jetbrains.kotlin.resolve.FindLoopsInSupertypes.access$isReachable(findLoopsInSupertypes.kt:1)
	at org.jetbrains.kotlin.resolve.SupertypeLoopCheckerImpl.findLoopsInSupertypesAndDisconnect(findLoopsInSupertypes.kt:38)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$3.invoke(AbstractTypeConstructor.kt:42)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$3.invoke(AbstractTypeConstructor.kt:22)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$3.postCompute(LockBasedStorageManager.java:171)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedLazyValue.invoke(LockBasedStorageManager.java:325)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedNotNullLazyValue.invoke(LockBasedStorageManager.java:370)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor.computeNeighbours(AbstractTypeConstructor.kt:57)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor.access$computeNeighbours(AbstractTypeConstructor.kt:22)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$3$resultWithoutCycles$1.invoke(AbstractTypeConstructor.kt:44)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$3$resultWithoutCycles$1.invoke(AbstractTypeConstructor.kt:22)
	at org.jetbrains.kotlin.resolve.SupertypeLoopCheckerImpl$findLoopsInSupertypesAndDisconnect$graph$1.getNeighbors(findLoopsInSupertypes.kt:33)
	at org.jetbrains.kotlin.resolve.SupertypeLoopCheckerImpl$findLoopsInSupertypesAndDisconnect$graph$1.getNeighbors(findLoopsInSupertypes.kt:26)
	at org.jetbrains.kotlin.utils.DFS.doDfs(DFS.java:98)
	at org.jetbrains.kotlin.utils.DFS.dfs(DFS.java:27)
	at org.jetbrains.kotlin.resolve.FindLoopsInSupertypes.isReachable(findLoopsInSupertypes.kt:53)
	at org.jetbrains.kotlin.resolve.FindLoopsInSupertypes.access$isReachable(findLoopsInSupertypes.kt:1)
	at org.jetbrains.kotlin.resolve.SupertypeLoopCheckerImpl.findLoopsInSupertypesAndDisconnect(findLoopsInSupertypes.kt:38)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$3.invoke(AbstractTypeConstructor.kt:42)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$3.invoke(AbstractTypeConstructor.kt:22)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$3.postCompute(LockBasedStorageManager.java:171)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedLazyValue.invoke(LockBasedStorageManager.java:325)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedNotNullLazyValue.invoke(LockBasedStorageManager.java:370)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor.computeNeighbours(AbstractTypeConstructor.kt:57)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor.access$computeNeighbours(AbstractTypeConstructor.kt:22)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$3$resultWithoutCycles$1.invoke(AbstractTypeConstructor.kt:44)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$3$resultWithoutCycles$1.invoke(AbstractTypeConstructor.kt:22)
	at org.jetbrains.kotlin.resolve.SupertypeLoopCheckerImpl$findLoopsInSupertypesAndDisconnect$graph$1.getNeighbors(findLoopsInSupertypes.kt:33)
	at org.jetbrains.kotlin.resolve.SupertypeLoopCheckerImpl$findLoopsInSupertypesAndDisconnect$graph$1.getNeighbors(findLoopsInSupertypes.kt:26)
	at org.jetbrains.kotlin.utils.DFS.doDfs(DFS.java:98)
	at org.jetbrains.kotlin.utils.DFS.dfs(DFS.java:27)
	at org.jetbrains.kotlin.resolve.FindLoopsInSupertypes.isReachable(findLoopsInSupertypes.kt:53)
	at org.jetbrains.kotlin.resolve.FindLoopsInSupertypes.access$isReachable(findLoopsInSupertypes.kt:1)
	at org.jetbrains.kotlin.resolve.SupertypeLoopCheckerImpl.findLoopsInSupertypesAndDisconnect(findLoopsInSupertypes.kt:38)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$3.invoke(AbstractTypeConstructor.kt:42)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$3.invoke(AbstractTypeConstructor.kt:22)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$3.postCompute(LockBasedStorageManager.java:171)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedLazyValue.invoke(LockBasedStorageManager.java:325)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedNotNullLazyValue.invoke(LockBasedStorageManager.java:370)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor.computeNeighbours(AbstractTypeConstructor.kt:57)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor.access$computeNeighbours(AbstractTypeConstructor.kt:22)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$3$resultWithoutCycles$1.invoke(AbstractTypeConstructor.kt:44)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$3$resultWithoutCycles$1.invoke(AbstractTypeConstructor.kt:22)
	at org.jetbrains.kotlin.resolve.SupertypeLoopCheckerImpl$findLoopsInSupertypesAndDisconnect$graph$1.getNeighbors(findLoopsInSupertypes.kt:33)
	at org.jetbrains.kotlin.resolve.SupertypeLoopCheckerImpl$findLoopsInSupertypesAndDisconnect$graph$1.getNeighbors(findLoopsInSupertypes.kt:26)
	at org.jetbrains.kotlin.utils.DFS.doDfs(DFS.java:98)
	at org.jetbrains.kotlin.utils.DFS.dfs(DFS.java:27)
	at org.jetbrains.kotlin.resolve.FindLoopsInSupertypes.isReachable(findLoopsInSupertypes.kt:53)
	at org.jetbrains.kotlin.resolve.FindLoopsInSupertypes.access$isReachable(findLoopsInSupertypes.kt:1)
	at org.jetbrains.kotlin.resolve.SupertypeLoopCheckerImpl.findLoopsInSupertypesAndDisconnect(findLoopsInSupertypes.kt:38)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$3.invoke(AbstractTypeConstructor.kt:42)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$3.invoke(AbstractTypeConstructor.kt:22)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$3.postCompute(LockBasedStorageManager.java:171)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedLazyValue.invoke(LockBasedStorageManager.java:325)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedNotNullLazyValue.invoke(LockBasedStorageManager.java:370)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor.computeNeighbours(AbstractTypeConstructor.kt:57)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor.access$computeNeighbours(AbstractTypeConstructor.kt:22)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$3$resultWithoutCycles$1.invoke(AbstractTypeConstructor.kt:44)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$3$resultWithoutCycles$1.invoke(AbstractTypeConstructor.kt:22)
	at org.jetbrains.kotlin.resolve.SupertypeLoopCheckerImpl$findLoopsInSupertypesAndDisconnect$graph$1.getNeighbors(findLoopsInSupertypes.kt:33)
	at org.jetbrains.kotlin.resolve.SupertypeLoopCheckerImpl$findLoopsInSupertypesAndDisconnect$graph$1.getNeighbors(findLoopsInSupertypes.kt:26)
	at org.jetbrains.kotlin.utils.DFS.doDfs(DFS.java:98)
	at org.jetbrains.kotlin.utils.DFS.dfs(DFS.java:27)
	at org.jetbrains.kotlin.resolve.FindLoopsInSupertypes.isReachable(findLoopsInSupertypes.kt:53)
	at org.jetbrains.kotlin.resolve.FindLoopsInSupertypes.access$isReachable(findLoopsInSupertypes.kt:1)
	at org.jetbrains.kotlin.resolve.SupertypeLoopCheckerImpl.findLoopsInSupertypesAndDisconnect(findLoopsInSupertypes.kt:38)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$3.invoke(AbstractTypeConstructor.kt:42)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$3.invoke(AbstractTypeConstructor.kt:22)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$3.postCompute(LockBasedStorageManager.java:171)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedLazyValue.invoke(LockBasedStorageManager.java:325)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedNotNullLazyValue.invoke(LockBasedStorageManager.java:370)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor.getSupertypes(AbstractTypeConstructor.kt:23)
	at org.jetbrains.kotlin.types.AbstractTypeConstructor.getSupertypes(AbstractTypeConstructor.kt:22)
	at org.jetbrains.kotlin.resolve.descriptorUtil.DescriptorUtilsKt.getSuperClassNotAny(DescriptorUtils.kt:136)
	at org.jetbrains.kotlin.resolve.descriptorUtil.DescriptorUtilsKt.getAllSuperclassesWithoutAny(DescriptorUtils.kt:350)
	at org.jetbrains.kotlin.resolve.lazy.descriptors.ClassResolutionScopesSupport$inheritanceScopeWithoutMe$1.invoke(ClassResolutionScopesSupport.kt:50)
	at org.jetbrains.kotlin.resolve.lazy.descriptors.ClassResolutionScopesSupport$inheritanceScopeWithoutMe$1.invoke(ClassResolutionScopesSupport.kt:30)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedLazyValue.invoke(LockBasedStorageManager.java:323)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedNotNullLazyValue.invoke(LockBasedStorageManager.java:370)
	at org.jetbrains.kotlin.resolve.lazy.descriptors.ClassResolutionScopesSupport$inheritanceScopeWithMe$1.invoke(ClassResolutionScopesSupport.kt:56)
	at org.jetbrains.kotlin.resolve.lazy.descriptors.ClassResolutionScopesSupport$inheritanceScopeWithMe$1.invoke(ClassResolutionScopesSupport.kt:30)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedLazyValue.invoke(LockBasedStorageManager.java:323)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedNotNullLazyValue.invoke(LockBasedStorageManager.java:370)
	at org.jetbrains.kotlin.resolve.lazy.descriptors.ClassResolutionScopesSupport$scopeForMemberDeclarationResolution$1.invoke(ClassResolutionScopesSupport.kt:64)
	at org.jetbrains.kotlin.resolve.lazy.descriptors.ClassResolutionScopesSupport$scopeForMemberDeclarationResolution$1.invoke(ClassResolutionScopesSupport.kt:30)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedLazyValue.invoke(LockBasedStorageManager.java:323)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedNotNullLazyValue.invoke(LockBasedStorageManager.java:370)
	at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassDescriptor.getScopeForMemberDeclarationResolution(LazyClassDescriptor.java:348)
	at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope.getScopeForMemberDeclarationResolution(LazyClassMemberScope.kt:98)
	at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.doGetFunctions(AbstractLazyMemberScope.kt:97)
	at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.access$doGetFunctions(AbstractLazyMemberScope.kt:39)
	at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope$functionDescriptors$1.invoke(AbstractLazyMemberScope.kt:49)
	at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope$functionDescriptors$1.invoke(AbstractLazyMemberScope.kt:39)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunction.invoke(LockBasedStorageManager.java:408)
	at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunctionToNotNull.invoke(LockBasedStorageManager.java:483)
	at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.getContributedFunctions(AbstractLazyMemberScope.kt:87)
	at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope.getContributedFunctions(LazyClassMemberScope.kt:126)
	at org.jetbrains.kotlin.resolve.lazy.LazyDeclarationResolver$resolveToDescriptor$1.visitNamedFunction(LazyDeclarationResolver.kt:124)
	at org.jetbrains.kotlin.resolve.lazy.LazyDeclarationResolver$resolveToDescriptor$1.visitNamedFunction(LazyDeclarationResolver.kt:94)
	at org.jetbrains.kotlin.psi.KtNamedFunction.accept(KtNamedFunction.java:48)
	at org.jetbrains.kotlin.resolve.lazy.LazyDeclarationResolver.resolveToDescriptor(LazyDeclarationResolver.kt:94)
	at org.jetbrains.kotlin.resolve.lazy.LazyDeclarationResolver.resolveToDescriptor(LazyDeclarationResolver.kt:91)
	at org.jetbrains.kotlin.resolve.lazy.ResolveSession.resolveToDescriptor(ResolveSession.java:331)
	at org.jetbrains.kotlin.idea.project.ResolveElementCache.resolveToElements(ResolveElementCache.kt:216)
	at org.jetbrains.kotlin.idea.caches.resolve.ResolutionFacadeImpl.analyze(ResolutionFacadeImpl.kt:59)
	at org.jetbrains.kotlin.idea.caches.resolve.ResolutionFacadeImpl.analyze(ResolutionFacadeImpl.kt:53)
	at org.jetbrains.kotlin.idea.caches.resolve.ResolutionUtils.analyze(resolutionApi.kt:82)
	at org.jetbrains.kotlin.idea.caches.resolve.ResolutionUtils.resolveToDescriptorIfAny(resolutionApi.kt:61)
	at org.jetbrains.kotlin.idea.caches.resolve.ResolutionUtils.resolveToDescriptorIfAny$default(resolutionApi.kt:59)
	at org.jetbrains.kotlin.idea.highlighter.markers.SuperDeclarationMarkerKt.resolveDeclarationWithParents(SuperDeclarationMarker.kt:101)
	at org.jetbrains.kotlin.idea.highlighter.markers.KotlinLineMarkerProviderKt.collectSuperDeclarationMarkers(KotlinLineMarkerProvider.kt:225)
	at org.jetbrains.kotlin.idea.highlighter.markers.KotlinLineMarkerProviderKt.access$collectSuperDeclarationMarkers(KotlinLineMarkerProvider.kt:1)
	at org.jetbrains.kotlin.idea.highlighter.markers.KotlinLineMarkerProvider.collectSlowLineMarkers(KotlinLineMarkerProvider.kt:90)
	at com.intellij.codeInsight.daemon.impl.SlowLineMarkersPass.addLineMarkers(SlowLineMarkersPass.java:78)
	at com.intellij.codeInsight.daemon.impl.SlowLineMarkersPass.doCollectInformation(SlowLineMarkersPass.java:65)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$0(PassExecutorService.java:434)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1029)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:427)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:494)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:426)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:402)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:154)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)