palexdev / MaterialFX

A library of material components for JavaFX
GNU Lesser General Public License v3.0
1.18k stars 119 forks source link

Cannot resolve symbol 'JavaFXThemes' and Cannot resolve symbol 'MaterialFXStylesheets' #383

Open dddryinside opened 1 month ago

dddryinside commented 1 month ago

I can't figure out why MaterialFXStylesheets and JavaFXThemes are compiled into bytecode (not into Java code). Because of this, I can't access them in my program. Here is this code, which is listed in the instructions on GitHub:

UserAgentBuilder.builder()
    .themes(JavaFXThemes.MODENA) 
    .themes(MaterialFXStylesheets.forAssemble(true))  
    .setDeploy(true) 
    .setResolveAssets(true)
    .build() 
    .setGlobal(); 

It causes legitimate errors: Cannot resolve symbol 'JavaFXThemes' and Cannot resolve symbol 'MaterialFXStylesheets'. Maybe I don't understand something, I've just been trying to solve this problem for many days and nothing has worked out. I would be very grateful for help!

IbnTaymiyyah commented 1 month ago

Same error, I am still looking for the solution :)

IbnTaymiyyah commented 1 month ago

I found a solution if you still need it.

  1. Download the MaterialFX repo
  2. Open it in your IDE
  3. On the left side, navigate to the materialfx folder -> build -> libs 4.Take the .jar file and use it in your project instead of the Maven .jar.

this worked for me.

stale[bot] commented 2 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

GrolarDan commented 2 weeks ago

Hi, which library version do you use. I'm using 11.17.0 where it works. If I remember good the 11.17.0 version fixed the need downloading the .jar file.

dddryinside commented 2 weeks ago

Hi, which library version do you use. I'm using 11.17.0 where it works. If I remember good the 11.17.0 version fixed the need downloading the .jar file.

I use the last version, 11.17.0

GrolarDan commented 2 weeks ago

Hi, which library version do you use. I'm using 11.17.0 where it works. If I remember good the 11.17.0 version fixed the need downloading the .jar file.

I use the last version, 11.17.0

That's strange because in my application it works.