AlmasB / FXGLGames

This repo contains sample games built with FXGL
http://almasb.github.io/FXGLGames/
MIT License
807 stars 325 forks source link

Can't run Cannon0.2.1 demo #18

Closed NTnewStudent closed 3 years ago

NTnewStudent commented 3 years ago
00:20:25.951 [JavaFX Application Thread] INFO  Engine               - FXGL-dev-SNAPSHOT (26.05.2021 15.59) on WINDOWS (J:11.0.6 FX:10.0.2-internal)
00:20:25.953 [JavaFX Application Thread] INFO  Engine               - Source code and latest versions at: https://github.com/AlmasB/FXGL
00:20:25.953 [JavaFX Application Thread] INFO  Engine               -              Join the FXGL chat at: https://gitter.im/AlmasB/FXGL
00:20:28.018 [FXGL Background Thread 1 ] WARN  SystemBundleService  - Failed to load: java.io.FileNotFoundException: E:\javaGame\FXGLGames-master\Cannon\system\fxgl.bundle (The system can not find the file specified。)
00:20:28.111 [FXGL Background Thread 1 ] INFO  FXGLApplication      - FXGL initialization took: 1.406 sec
00:20:28.133 [JavaFX Application Thread] FATAL FXGLApplication      - Uncaught Exception:
java.lang.NoSuchFieldError: BACK
    at com.almasb.fxgl.input.MouseTrigger$Companion$WhenMappings.<clinit>(Unknown Source)
    at com.almasb.fxgl.input.MouseTrigger$Companion.buttonToString(Triggers.kt:130)
    at com.almasb.fxgl.input.MouseTrigger.<init>(Triggers.kt:143)
    at com.almasb.fxgl.input.Input.addAction(Input.kt:433)
    at com.almasb.fxgl.input.Input.addAction$default(Input.kt:432)
    at com.almasb.fxgl.dsl.FXGL$Companion.onBtnDown(FXGL.kt:409)
    at com.almasb.fxgl.dsl.FXGL$Companion.onBtnDown(FXGL.kt:405)
    at com.almasb.fxgl.dsl.FXGL.onBtnDown(FXGL.kt)
    at com.almasb.fxglgames.cannon.CannonApp.initInput(CannonApp.java:64)
    at com.almasb.fxgl.app.FXGLApplication$GameApplicationService.onMainLoopStarting(FXGLApplication.kt:516)
    at com.almasb.fxgl.app.Engine.startLoop(Engine.kt:149)
    at com.almasb.fxgl.app.FXGLApplication$startImpl$task$2.accept(FXGLApplication.kt:145)
    at com.almasb.fxgl.app.FXGLApplication$startImpl$task$2.accept(FXGLApplication.kt:69)
    at com.almasb.fxgl.core.concurrent.IOTask.succeed(IOTask.java:164)
    at com.almasb.fxgl.core.concurrent.IOTask$1.succeeded(IOTask.java:153)
    at javafx.graphics/javafx.concurrent.Task.setState(Task.java:726)
    at javafx.graphics/javafx.concurrent.Task$TaskCallable.lambda$call$1(Task.java:1436)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(PlatformImpl.java:418)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:417)
    at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:175)
    at java.base/java.lang.Thread.run(Thread.java:834)

00:20:28.133 [JavaFX Application Thread] FATAL FXGLApplication      - Application will now exit
00:20:33.333 [FXGL Background Thread 2 ] WARN  UpdaterService       - Failed to find updates: java.net.UnknownHostException: raw.githubusercontent.com

This error is reported when I need mouse input My jdk is 11.0.6

AlmasB commented 3 years ago

The javafx version used (FX:10.0.2-internal) is not compatible. For some reason, your IDE or environment is picking up this version, rather than the one supplied, which is javafx 16. To fix, remove any other version from your system and ensure your IDE/environment does not use any built-in javafx version

NTnewStudent commented 3 years ago

The javafx version used (FX:10.0.2-internal) is not compatible. For some reason, your IDE or environment is picking up this version, rather than the one supplied, which is javafx 16. To fix, remove any other version from your system and ensure your IDE/environment does not use any built-in javafx version

Thanks for your help i have solved it