I am trying to follow the following tutorial,
I use eclipse
as my IDE
of choice and maven
for the dependencies. Since I am unfamiliar with Kotlin
and I am actually programming in Java
I have no idea how to solve the issue. I had a look at the following posts:
un-initialized property access exception late-init property pref has not been initialize
How to check if a late-init variable has been initialized
Exception:
kotlin.UninitializedPropertyAccessException: lateinit property engine
has not been initialized at
com.almasb.fxgl.dsl.FXGL$Companion.getAssetLoader(FXGL.kt:106) at
com.almasb.fxgl.dsl.FXGL$Companion.image(FXGL.kt:199) at
com.almasb.fxgl.dsl.FXGL.image(FXGL.kt) at
AnimationComponent.<init>(AnimationComponent.java:18) at
SimpleGameApp.initSettings(SimpleGameApp.java:15) at
com.almasb.fxgl.app.GameApplication.takeUserSettings(GameApplication.java:118)
at
com.almasb.fxgl.app.GameApplication.launch(GameApplication.java:96)
at
com.almasb.fxgl.app.GameApplication.launch(GameApplication.java:58)
at SimpleGameApp.main(SimpleGameApp.java:37)
I have no clue what could be wrong, I tried to add some dependencies for Kotlin
in my pom file but this didn't help either. I think a source of my problem could be the deprecation warning in my IDE which you can see in the image.
Deprecation Warning fxgl.component