Recently I started playing with Android Bootstrap. I generated an app using the website, built and installed it, but it crashed immediately on launch with this error:

E/AndroidRuntime( 3497): Caused by: java.lang.RuntimeException: native typeface cannot be made
E/AndroidRuntime( 3497):        at<init>(Typeface.jav a:175)
E/AndroidRuntime( 3497):        at
E/AndroidRuntime( 3497):        at com.example.myapp1.ui.view.CapitalizedTextVie w.setTF(
E/AndroidRuntime( 3497):        at com.example.myapp1.ui.view.CapitalizedTextVie w.<init>(
E/AndroidRuntime( 3497):        ... 23 more

That’s ok, others had the same problem, so the fix was easy: download the Roboto Regular font from, copy Roboto-Regular.ttf to the assets/ folder of the app, rebuild, relaunch, that’s it.

I normally don’t unzip blindly just anything I downloaded, so I checked the contents of the roboto zip first:

$ unzip -l ~/Downloads/ 
Archive:  ~/Downloads/
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  2013-10-26 02:33   Roboto_v1.2/
        0  2013-06-04 22:39   Roboto_v1.2/Icon^M
        0  2013-10-26 02:36   __MACOSX/
        0  2013-10-26 02:36   __MACOSX/Roboto_v1.2/
   447433  2013-06-04 22:39   __MACOSX/Roboto_v1.2/._Icon^M
        0  2013-10-26 02:34   Roboto_v1.2/Roboto/
     6148  2013-10-26 02:34   Roboto_v1.2/Roboto/.DS_Store

Wow, what a load of junk: __MACOSX directory, .DS_Store files, Icon files with 0 length… I’m surprised that a zip published on can be packaged so carelessly, ridden with junk. Weird.

blog comments powered by Disqus