title: LIBGDX FreeTypeFontGenerator - Crash on Android
body: <p>I have been trying to add in .ttf fonts to my android mobile application. I am using the Libgdx engine to create my application, and have tried to add in the True Type extension to allow the use of .ttf fonts. Here is the code that I am running to try and create a font.</p>
  
  <pre><code>FreeTypeFontGenerator generator = new FreeTypeFontGenerator(Gdx.files.internal("data/fonts/font.ttf"));
  BitmapFont font = generator.generateFont(12);
  generator.dispose();
  </code></pre>
  
  <p>When I call this code, my application gives me the <code>Unfortunately, X has stopped.</code> message and no other information. I have included the <code>gdx-freetype-sources.jar</code> and the <code>gdx-freetype.jar</code> in both the core and android projects. I have clicked the option to export them on both projects. And I have included the two <code>libgdx-freetype.so</code> files in the <code>armeabi</code> and <code>armeabi-v7a</code> folders.</p>
  
  <p>Can anyone tell me why this is not working?</p>
  
  <p>Edit: Here is my error output code in the 'LogCat'</p>
  
  <pre><code>04-19 15:33:08.479: E/AndroidRuntime(31195): FATAL EXCEPTION: GLThread 7533
  04-19 15:33:08.479: E/AndroidRuntime(31195): Process: com.zach.nice, PID: 31195
  04-19 15:33:08.479: E/AndroidRuntime(31195): java.lang.NoSuchFieldError: com.badlogic.gdx.graphics.g2d.BitmapFont$Glyph.id
  04-19 15:33:08.479: E/AndroidRuntime(31195):    at com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator.generateData(FreeTypeFontGenerator.java:288)
  04-19 15:33:08.479: E/AndroidRuntime(31195):    at com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator.generateFont(FreeTypeFontGenerator.java:137)
  04-19 15:33:08.479: E/AndroidRuntime(31195):    at com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator.generateFont(FreeTypeFontGenerator.java:148)
  04-19 15:33:08.479: E/AndroidRuntime(31195):    at com.zach.nice.Nice.create(Nice.java:53)
  04-19 15:33:08.479: E/AndroidRuntime(31195):    at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:292)
  04-19 15:33:08.479: E/AndroidRuntime(31195):    at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1512)
  04-19 15:33:08.479: E/AndroidRuntime(31195):    at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
  </code></pre>