JavaFX,Unity3D,Android,IOS等技术教程和生活随笔,仅供记录

http://www.wingmei.cn/wp-content/themes/Vtrois-Kratos-e85a527/images/background.jpg

Libgdx Couldn't load shared library 'libgdx-freetype64.dylib' for target: Mac OS X, 64-bit

在Mac上使用Libgdx开发时,用到了freetype,结果运行时报错Couldn’t load shared library ‘libgdx-freetype64.dylib’ for target: Mac OS X, 64-bit。

其实就是跨平台问题,我们在使用freetype时,需要在gradle中添加如下代码:

FreeTypeFont Gradle
Core Dependency:
compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"

Desktop Dependency:
compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"

这样就正常了。

点赞

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注