'JavaFx Project Error : Caused by: com.sun.javafx.fxml.PropertyNotFoundException: Property "iconName" does not exist or is read-only

so I'm trying to run this project and it displays this error eventhough I added the fontawesomefx-8.2.jar

 Caused by: java.lang.RuntimeException: Exception in Application start
 method     at
com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)   at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$159(LauncherImpl.java:182) 
    at java.lang.Thread.run(Thread.java:748)

Caused by: javafx.fxml.LoadException:  file:/C:/Users/Yasmine%20Daly/Downloads/Gaming%20Dashboard/Gaming%20Dashboard/dist/run1549224879/Gaming%20Dashboard.jar!/gaming/dashboard/UI.fxml:23

    at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2601)  at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2579)    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3214)    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3175)    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3148)    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3124)    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3104)    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3097)    at gaming.dashboard.GamingDashboard.start(GamingDashboard.java:13)  at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$166(LauncherImpl.java:863)     at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$179(PlatformImpl.java:326)     at com.sun.javafx.application.PlatformImpl.lambda$null$177(PlatformImpl.java:295)   at java.security.AccessController.doPrivileged(Native Method)   at com.sun.javafx.application.PlatformImpl.lambda$runLater$178(PlatformImpl.java:294)   at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)     at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)  at com.sun.glass.ui.win.WinApplication.lambda$null$152(WinApplication.java:177)     ... 1 more Caused by: com.sun.javafx.fxml.PropertyNotFoundException: Property "iconName" does not exist or is read-only.    at javafx.fxml.FXMLLoader$Element.processValue(FXMLLoader.java:348)     at javafx.fxml.FXMLLoader$Element.processPropertyAttribute(FXMLLoader.java:325)     at javafx.fxml.FXMLLoader$Element.processInstancePropertyAttributes(FXMLLoader.java:235)    at javafx.fxml.FXMLLoader$ValueElement.processEndElement(FXMLLoader.java:767)   at javafx.fxml.FXMLLoader.processEndElement(FXMLLoader.java:2823)   at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2532)    ... 17 more Exception running application gaming.dashboard.GamingDashboard Java Result: 1

This is the UI file where the iconName exists and is underlined in red;

<FontAwesomeIcon iconName="MUSIC" layoutX="32.0" layoutY="134.0" size="1.5em" styleClass="sidebar-icon" />
            <FontAwesomeIcon iconName="GEAR" layoutX="32.0" layoutY="175.0" size="1.5em" styleClass="sidebar-icon" />
            <FontAwesomeIcon iconName="FILE" layoutX="34.0" layoutY="210.0" size="1.2em" styleClass="sidebar-icon" />
            <FontAwesomeIcon iconName="DASHBOARD" layoutX="33.0" layoutY="242.0" size="1.2em" styleClass="sidebar-icon" />
            <FontAwesomeIcon iconName="MUSIC" layoutX="32.0" layoutY="278.0" size="1.2em" styleClass="sidebar-icon" />
            <FontAwesomeIcon iconName="HEART" layoutX="32.0" layoutY="368.0" size="1.2em" styleClass="sidebar-icon" />
            <FontAwesomeIcon iconName="GEAR" layoutX="31.0" layoutY="399.0" size="1.5em" styleClass="sidebar-icon" />


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source