Note that there are some explanatory texts on larger screens.

plurals
  1. POTrueType fails to load in Android honeycomb
    primarykey
    data
    text
    <p>I have searched a bit but all the answers on the exception is related to people loading the wrong font. </p> <p>However, I am trying to load a TrueType font. It works for the majority of the devices I have tested on. However, when trying to load on the Tab 10.1 running Android 3.1 or EEEPad running 3.2 I get the following exception: </p> <pre><code>Caused by: java.lang.RuntimeException: native typeface cannot be made </code></pre> <p>The complete stack trace: </p> <pre><code>java.lang.RuntimeException: Unable to start activity ComponentInfo{se.healthyheroes.android.app/se.healthyheroes.android.app.LoginActivity}: java.lang.RuntimeException: native typeface cannot be made at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1815) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1831) at android.app.ActivityThread.access$500(ActivityThread.java:122) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1024) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:132) at android.app.ActivityThread.main(ActivityThread.java:4123) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:491) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.RuntimeException: native typeface cannot be made at android.graphics.Typeface.&lt;init&gt;(Typeface.java:147) at android.graphics.Typeface.createFromAsset(Typeface.java:121) at se.healthyheroes.android.app.LoginActivity.initViews(LoginActivity.java:154) at se.healthyheroes.android.app.LoginActivity.onCreate(LoginActivity.java:94) at android.app.Activity.performCreate(Activity.java:4397) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1779) ... 11 more java.lang.RuntimeException: native typeface cannot be made at android.graphics.Typeface.&lt;init&gt;(Typeface.java:147) at android.graphics.Typeface.createFromAsset(Typeface.java:121) at se.healthyheroes.android.app.LoginActivity.initViews(LoginActivity.java:154) at se.healthyheroes.android.app.LoginActivity.onCreate(LoginActivity.java:94) at android.app.Activity.performCreate(Activity.java:4397) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1779) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1831) at android.app.ActivityThread.access$500(ActivityThread.java:122) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1024) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:132) at android.app.ActivityThread.main(ActivityThread.java:4123) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:491) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599) at dalvik.system.NativeStart.main(Native Method) </code></pre> <p>You might wonder about line 154 in LoginActivity. The line is this one: </p> <pre><code>Typeface tf =(Typeface.createFromAsset(getAssets(), "fonts/style_5784.ttf")); </code></pre> <p>The font is located under "assets/fonts/style_5784.ttf" in my project in Eclipse. The really weird thing is that it works on all the other devices except honeycomb. </p> <p>Does anyone have an idea what could cause the exception? Could the font be broken or perhaps there is something as simple as the name of the file? The only thing I managed to understand by searching around for it is that it could be the font that is broken somehow. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload