liuXIII
2021-11-07 12:13
采纳率: 100%
浏览 55
已结题

idea Error:org/gradle/tooling/BuildException 报错

写什么程序都有这个报错,现在无从下手

img

com.intellij.diagnostic.PluginException: org/gradle/tooling/BuildAction [Plugin: org.jetbrains.android]
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.instantiate(ActionManagerImpl.java:178)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.convertStub(ActionManagerImpl.java:154)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.getActionImpl(ActionManagerImpl.java:510)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.getAction(ActionManagerImpl.java:498)
    at com.intellij.openapi.actionSystem.DefaultActionGroup.unStub(DefaultActionGroup.java:371)
    at com.intellij.openapi.actionSystem.DefaultActionGroup.getChildren(DefaultActionGroup.java:330)
    at com.intellij.openapi.actionSystem.ActionGroupStub.initGroup(ActionGroupStub.kt:26)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.convertGroupStub(ActionManagerImpl.java:212)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.getActionImpl(ActionManagerImpl.java:510)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.getAction(ActionManagerImpl.java:498)
    at org.jetbrains.android.AndroidPlugin.setUpActionsUnderFlag(AndroidPlugin.java:63)
    at org.jetbrains.android.AndroidPlugin.access$000(AndroidPlugin.java:20)
    at org.jetbrains.android.AndroidPlugin$AndroidActionConfigurationCustomizer.customize(AndroidPlugin.java:41)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.lambda$new$0(ActionManagerImpl.java:144)
    at com.intellij.openapi.extensions.impl.ExtensionProcessingHelper.forEachExtensionSafe(ExtensionProcessingHelper.java:21)
    at com.intellij.openapi.extensions.ExtensionPointName.forEachExtensionSafe(ExtensionPointName.java:50)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.<init>(ActionManagerImpl.java:144)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:44)
    at com.intellij.serviceContainer.PlatformComponentManagerImpl.instantiateClassWithConstructorInjection(PlatformComponentManagerImpl.kt:505)
    at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:52)
    at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:39)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:110)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:72)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstance$default(BaseComponentAdapter.kt:65)
    at com.intellij.serviceContainer.PlatformComponentManagerImpl.getService(PlatformComponentManagerImpl.kt:288)
    at com.intellij.openapi.components.ServiceManager.getService(ServiceManager.java:18)
    at com.intellij.openapi.actionSystem.ActionManager.getInstance(ActionManager.java:29)
    at com.intellij.openapi.actionSystem.ex.ActionManagerEx.getInstanceEx(ActionManagerEx.java:17)
    at com.intellij.tools.ToolManager.<init>(ToolManager.java:25)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:44)
    at com.intellij.serviceContainer.PlatformComponentManagerImpl.instantiateClassWithConstructorInjection(PlatformComponentManagerImpl.kt:505)
    at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:52)
    at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:39)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:110)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:72)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstance$default(BaseComponentAdapter.kt:65)
    at com.intellij.serviceContainer.PlatformComponentManagerImpl$preloadServices$future$1.run(PlatformComponentManagerImpl.kt:622)
    at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
    at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:222)
    at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:30)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:201)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:193)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NoClassDefFoundError: org/gradle/tooling/BuildAction
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:398)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.instantiate(ActionManagerImpl.java:166)
    ... 52 more
Caused by: java.lang.ClassNotFoundException: org.gradle.tooling.BuildAction PluginClassLoader[org.jetbrains.android, 10.3.5] com.intellij.ide.plugins.cl.PluginClassLoader@7bee4b8d
    at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:77)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    ... 55 more

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

  • 最佳回答

    看你这个错误应该是jar包兼容性的问题,换一个版本的jar包试试。

    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题