NokiaX 报告所用字体的此异常。
我有一个库项目,其中有assets/fonts/Roboto-*.ttf
文件。我已经完成了关于这个主题的其他问题,它们都暗示了拼写检查或文件夹检查(应该在 下assets/fonts
)。他们似乎都不是问题。此代码适用于 Android。
我在这里想念什么?
05-04 10:19:49.430: E/Crittercism(17208): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.taxeeta.nokiax/com.taxeeta.SplashScreen}: java.lang.RuntimeException: native typeface cannot be made
05-04 10:19:49.430: E/Crittercism(17208): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2067)
05-04 10:19:49.430: E/Crittercism(17208): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2092)
05-04 10:19:49.430: E/Crittercism(17208): at android.app.ActivityThread.access$600(ActivityThread.java:133)
05-04 10:19:49.430: E/Crittercism(17208): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203)
05-04 10:19:49.430: E/Crittercism(17208): at android.os.Handler.dispatchMessage(Handler.java:99)
05-04 10:19:49.430: E/Crittercism(17208): at android.os.Looper.loop(Looper.java:137)
05-04 10:19:49.430: E/Crittercism(17208): at android.app.ActivityThread.main(ActivityThread.java:4807)
05-04 10:19:49.430: E/Crittercism(17208): at java.lang.reflect.Method.invokeNative(Native Method)
05-04 10:19:49.430: E/Crittercism(17208): at java.lang.reflect.Method.invoke(Method.java:511)
05-04 10:19:49.430: E/Crittercism(17208): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
05-04 10:19:49.430: E/Crittercism(17208): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:559)
05-04 10:19:49.430: E/Crittercism(17208): at dalvik.system.NativeStart.main(Native Method)
05-04 10:19:49.430: E/Crittercism(17208): Caused by: java.lang.RuntimeException: native typeface cannot be made
05-04 10:19:49.430: E/Crittercism(17208): at android.graphics.Typeface.<init>(Typeface.java:175)
05-04 10:19:49.430: E/Crittercism(17208): at android.graphics.Typeface.createFromAsset(Typeface.java:149)
05-04 10:19:49.430: E/Crittercism(17208): at com.taxeeta.support.FontUtils.setRobotoFont(FontUtils.java:14)
05-04 10:19:49.430: E/Crittercism(17208): at com.taxeeta.SplashScreen.onCreate(SplashScreen.java:165)
05-04 10:19:49.430: E/Crittercism(17208): at android.app.Activity.performCreate(Activity.java:5180)
05-04 10:19:49.430: E/Crittercism(17208): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
05-04 10:19:49.430: E/Crittercism(17208): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2031)
05-04 10:19:49.430: E/Crittercism(17208): ... 11 more