只能在NetBeans中加载一些gradle项目 [英] Can only load some gradle projects in NetBeans

查看:255
本文介绍了只能在NetBeans中加载一些gradle项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

非常类似于: 无法在NetBeans中加载gradle项目 但是我认为这并不完全相同,只是因为这个问题的年代久远.

Very similar to: Can't load gradle project in NetBeans but I think not exactly the same, if only because of the age of that question.

我在启动Netbeans 11后看到了 的gradle消息,这很好.希望使用IDE打开gradle项目.

I saw gradle messages after firing up Netbeans 11, which is good. Looking to open gradle projects using the IDE.

要安装Gradle:

但是我如何使用gradle构建打开项目,如:

but how do I open projects with gradle builds like:

随着gradle的建立,NB 9将打开所有这些项目.我意识到这听起来很愚蠢.我会尝试一些组合.

NB 9 opens all these projects as gradle builds fine. I realize it sounds rather silly. I'll try some combinations.

确认存在Gradle:

Confirming that Gradle is present:

甚至从头开始创建新项目:

even creating a new project from scratch:

thufir@dur:~/NetBeansProjects$ 
thufir@dur:~/NetBeansProjects$ mkdir gradleInit
thufir@dur:~/NetBeansProjects$ 
thufir@dur:~/NetBeansProjects$ cd gradleInit/
thufir@dur:~/NetBeansProjects/gradleInit$ 
thufir@dur:~/NetBeansProjects/gradleInit$  gradle init --type java-application --test-framework testng --dsl kotlin 
Starting a Gradle Daemon, 3 incompatible and 1 stopped Daemons could not be reused, use --status for details

Project name (default: gradleInit): gradleInit

Source package (default: gradleInit): gradleInit

BUILD SUCCESSFUL in 24s
2 actionable tasks: 2 executed
thufir@dur:~/NetBeansProjects/gradleInit$ 
thufir@dur:~/NetBeansProjects/gradleInit$ gradle clean run

> Task :run
Hello world.

BUILD SUCCESSFUL in 17s
3 actionable tasks: 2 executed, 1 up-to-date
thufir@dur:~/NetBeansProjects/gradleInit$ 

但是Netbeans只会钻入"目录,它不会将其视为gradle项目:

Yet Netbeans only will "drill into" the directory, it isn't seeing it as a gradle project:

奇怪的是,NB似乎没有将其识别为一个项目.

odd that NB doesn't seem to recognize it as a project.

推荐答案

Gradle支持是NetBeans 11的一项新内置功能.几周前,

The Gradle support is a new built-in feature for NetBeans 11. A few weeks ago a source patch was released.

您提到了NetBeans 9,所以我想在您使用单独的插件.

You mentioned NetBeans 9, so I guess before you were using a separate plugin.

因此,您要么尝试应用补丁(即使票证看起来不像您遇到的错误,也可以解决),要么您可以给插件另一个机会.根据用户评论,版本2.0.2中的插件可与NetBeans 11一起使用.

So either you try to apply the patch (even though the tickets were not looking like the bug you encounter was adressed) or maybe you could give the plugin another chance. Based on the user comments the plugin in version 2.0.2 works with NetBeans 11.

这篇关于只能在NetBeans中加载一些gradle项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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