Gradle解决依赖关系并构建/运行良好,但是IntelliJ却没有 [英] Gradle resolve dependecies and build/run fine but IntelliJ do not

查看:92
本文介绍了Gradle解决依赖关系并构建/运行良好,但是IntelliJ却没有的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将IntelliJ用于我的一个Java项目。它必须使用gradle进行构建,并且必须在命令行中正常运行,无论是构建还是运行。但是,Intellij无法构建和运行项目。
它可以导入具有所有依赖项的项目,但是会给我这个错误:

I am using IntelliJ for one of my java projects. It has to build with gradle and from the command line, it works fine, both build and run. However, Intellij is not able to build and run the project. It can import the project with all the dependencies, but it gives me this error:

Unable to save plugin settings: The plugin org.jetbrains.plugins.gradle failed to save settings and has been disabled. Please restart IntelliJ IDEA

我已经在网络上尝试了所有解决方案:

I have already tried all the solution on the web:


  • 删除缓存

  • 重新启动

  • 启用gradle

  • 启用grail

  • 重新安装intellij

  • removing cache
  • restart
  • enable gradle
  • enable grail
  • reinstall intellij

项目中的问题是我正在编写解析器解析所有类的Java代码,但是,在构建时,我会收到这种类型的92错误:

The problem in the project is that when I am writing the java code the parser resolves all the classes, however, at the moment of build I get 92 error of this type:

Error:(5, 32) java: package org.eclipse.jdt.core.dom does not exist

但是外部库是通过gradle解析和安装的。
还有其他解决方案吗?

But the external libraries are resolved and installed by gradle. Any other solution?

推荐答案

正如jetBrains支持人员所建议的那样,该问题与项目中缺少某些许可有关包含在OneDrive中,且占位符功能处于活动状态。
将项目移到OneDrive目录之外即可解决此问题。

As suggested by jetBrains support, the problem was related to some missing permission as the project was contained in OneDrive with placeholder function active. Moving the project outside the OneDrive directory will resolve the problem for now.

这篇关于Gradle解决依赖关系并构建/运行良好,但是IntelliJ却没有的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆