I've recently switched to Mac OSX, and when opening a project that I was developing on Windows, I get this error:
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load shared library 'libgdx-freetype64.dylib' for target: Mac OS X, 64-bit
at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:115)
at com.badlogic.gdx.graphics.g2d.freetype.FreeType.initFreeType(FreeType.java:541)
at com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator.<init>(FreeTypeFontGenerator.java:102)
at com.evh98.lithium.ui.Central.load(Central.java:43)
at com.evh98.lithium.Lithium.create(Lithium.java:60)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:136)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:114)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: Unable to read file for extraction: libgdx-freetype64.dylib
at com.badlogic.gdx.utils.SharedLibraryLoader.readFile(SharedLibraryLoader.java:124)
at com.badlogic.gdx.utils.SharedLibraryLoader.loadFile(SharedLibraryLoader.java:245)
at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:113)
... 6 more
Any help would be greatly appreciated, thanks in advance.
With LibGDX 1.9.6, you need to make sure to add the proper dependencies in build.gradle
https://github.com/libgdx/libgdx/wiki/Dependency-management-with-Gradle#freetypefont-gradle
FreeTypeFont GradleCore Dependency:
compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
Desktop Dependency:
compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With