Libgdx如何添加FreeType扩展?

The*_*het 2 java freetype gradle libgdx

我已经尝试了maven的事情,但它不会工作.我可能在依赖关系或其他东西写错了一行.这是链接maven存储库.

小智 6

简单方法:确保在项目生成之前检查gdx-setup应用程序中的"Freetype"扩展.

否则,您可以通过以下方式将其添加到已创建的项目中:

在根项目的build.gradle中,只需添加以下依赖项:

桌面:

compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
Run Code Online (Sandbox Code Playgroud)

机器人:

    compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
    natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi"
    natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a"
    natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-arm64-v8a"
    natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"
    natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86_64"
Run Code Online (Sandbox Code Playgroud)

IOS:

    compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-ios"
Run Code Online (Sandbox Code Playgroud)

html:不兼容,我害怕

核心:

    compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
Run Code Online (Sandbox Code Playgroud)