I'm using Android Studio 1.0.2 with LibGDX. I'm trying to use a custom .ttf file but it isn't working. This is what I've done:
I downloaded the gdx-freetype .jar and extracted it. Added the appropriate .so files the android target armeabi/armeabi-v7a. And the extracted contents of the .jar to the root lib folder as defined in this post from the developer.
I right clicked and linked the .jar to the library and followed the rest of the instructions of the accepted answer in this post.
The problem is that no matter what I do when I start typing FreeType... in my main Java class it doesn't show up or let me import it. Anyone have any other suggestions or have been through the same thing?
I would suggest using gradle to do this for you. If you add freetype similar to this to your build.gradle it will be downloaded automatically (if you upgrade gradle dependencies for your project):
project(":android") {
apply plugin: "android"
configurations { natives }
dependencies {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
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-x86"
}
}