Java.lang.NoClassDefFoundError when using TrueTypeFontFactory in Libgdx for Android
I am trying to run android libgdx project but it just doesn't work. Its showing: ERROR / AndroidRuntime (5502): java.lang.NoClassDefFoundError: com.badlogic.gdx.graphics.g2d.stbtt.TrueTypeFontFactory
I used the gdx-stb-truetype.jar libgdx extension library to show the TTF fonts. My project structure is like this:
Common project: including gdx-stb-truetype.jar and gdx-stb-truetype-natives.jar as a reference library
Android Project: Linked Project: Shared Project
Desktop Project: Related Project: Shared Project
It works fine on desktop, but can't run it on Android.
Please help me with this. I have been trying this for almost 2 days now and it is very urgent for me. Thanks guys who want to help.
+3
source to share