如何调试在Eclipse中使用Dagger的Gluon应用程序

时间:2016-02-25 09:52:25

标签: eclipse debugging gradle javafx-8 gluon

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

我使用Gluon项目向导创建了一个新项目,我可以通过Gradle任务编译并启动#34;运行"。经过一些玩弄项目后,我产生了一个错误,我想用eclipse调试器逐步调试。

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

更新: 一世) 我需要补充一点,我想用匕首使用Gluon点燃,我的应用程序无法通过eclipse运行菜单启动,因为匕首模块的代码生成尚未执行。没有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

提前致谢!

0 个答案:

没有答案