简体   繁体   English

Intelij IDEA中的2个Java项目之间的区别? -无法刷新Gradle

[英]Differences between 2 java projects in Intelij IDEA? - Cannot refresh Gradle

I have 2 separate Java Projects that I am able to both open in Intelij . 我有2个独立的Java项目,都可以在Intelij打开。

For one project I cannot refresh gradle - 对于一个项目,我无法刷新gradle-

"No such property - GradleVersion for class: JetGradlePlugin" 

I also get "cannot find declaration to go to" when I click on a java class/method. 当我单击一个Java类/方法时,也会得到"cannot find declaration to go to" All the java classes are shown with a ".java" on the end in the Project View. 所有Java类在项目视图的末尾都带有".java"

The other project does not have any issues at all. 另一个项目根本没有任何问题。

I have ran "clean" and "install" for both - what could be the issue? 我同时运行了"clean""install" ,这可能是什么问题?

Note - I am running using Gradle wrapper and Java 8 for both. 注意-我正在同时使用Gradle包装和Java 8。

It looks like are using an old IntelliJ IDEA version (2017.x?) and the recent Gradle version (5.x?). 似乎正在使用旧的IntelliJ IDEA版本(2017.x?)和最新的Gradle版本(5.x?)。 This will not work, unfortunately. 不幸的是,这行不通。

You either need to downgrade to Gradle 4.10.3 or update to the current IntelliJ IDEA release to get the support for the most recent Gradle versions. 您需要降级到Gradle 4.10.3或更新到当前的IntelliJ IDEA版本,以获得对最新Gradle版本的支持。

Your projects are probably using different Gradle versions via the Gradle wrapper, make sure the same version is used for the project that doesn't work. 您的项目可能通过Gradle包装器使用了不同的Gradle版本,请确保对不起作用的项目使用相同的版本。

Related issue . 相关问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM