0

我正在尝试创建一个基于 Gluon 的 JavaFX 应用程序。因此,我将 Eclipse 与 Gluon 插件一起使用。我需要说我也是 Gradle 和 JavaFX 的新手,所以也许我对这个问题感到羞耻,因为它太明显了。

我使用 Gluon 项目向导创建了一个新项目,我可以通过 Gradle 任务“运行”进行编译和启动。在玩弄了这个项目之后,我产生了一个错误,我想用 eclipse 调试器逐步调试。

那么,如何调试 Gluon/Gradle 应用程序?我也对在哪里可以配置 Gradle 任务感兴趣。我在任务列表中看到了预配置的,但只能通过双击来执行它们。甚至没有上下文菜单。一个想法是列表中有一个调试 gradle 任务,但到目前为止我找不到。

更新:我)我需要补充一点,我想将 Gluon ignite 与 dagger 一起使用,并且我的应用程序无法通过 eclipse 运行菜单启动,因为尚未执行 dagger 模块的代码生成。在没有 Dagger 的情况下调试和启动似乎有效。所以我的问题比我想象的更具体...... II)

Exception in Application start method
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(Unknown Source)
    at com.sun.javafx.application.LauncherImpl.launchApplication(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Exception in Application start method
    at com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: Module adapter for class com.myapp.main.MyApp$DaggerModule could not be loaded. Please ensure that code generation was run for this module.
    at dagger.internal.FailoverLoader$1.create(FailoverLoader.java:45)
    at dagger.internal.FailoverLoader$1.create(FailoverLoader.java:40)
    at dagger.internal.Memoizer.get(Memoizer.java:56)
    at dagger.internal.FailoverLoader.getModuleAdapter(FailoverLoader.java:57)
    at dagger.internal.Modules.loadModules(Modules.java:43)
    at dagger.ObjectGraph$DaggerObjectGraph.makeGraph(ObjectGraph.java:174)
    at dagger.ObjectGraph$DaggerObjectGraph.access$000(ObjectGraph.java:138)
    at dagger.ObjectGraph.create(ObjectGraph.java:129)
    at com.gluonhq.ignite.dagger.DaggerContext.init(DaggerContext.java:58)
    at com.myapp.main.MyApp.start(MyApp.java:85)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(Unknown Source)
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(Unknown Source)
    at com.sun.javafx.application.PlatformImpl.lambda$null$173(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(Unknown Source)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$null$148(Unknown Source)
    ... 1 more
Exception running application com.myapp.main.MyApp

提前致谢!

4

0 回答 0