在AS中自定義字型庫報錯:java.lang.RuntimeException: native typeface cannot be made

那時@花開花不語發表於2017-12-14

1.Code:

在AS中自定義字型庫報錯:java.lang.RuntimeException: native typeface cannot be made
圖1

2.Error Message:

在AS中自定義字型庫報錯:java.lang.RuntimeException: native typeface cannot be made
圖2

3.Resolved Method:

      在src---> main裡面新建assets資料夾,在此資料夾中新建字型資料夾和ttf檔案,如圖3:

在AS中自定義字型庫報錯:java.lang.RuntimeException: native typeface cannot be made
圖3

注意:1.可能存在資料夾名稱大小寫的問題

          2.可能是因為未在build.gradle檔案中新增:如圖4

在AS中自定義字型庫報錯:java.lang.RuntimeException: native typeface cannot be made
圖4

相關文章