[英]Calligraphy font not getting applied In release build of Android app with dexguard
我用過這個流行的書法圖書館書法
我在我的項目中集成了Dex-guard
它與proguardFile getDefaultDexGuardFile('dexguard-debug.pro')一起工作正常
每當我使用proguardFile getDefaultDexGuardFile('dexguard-release.pro')創建發布版本時
我在創建發布版本時在log-cat中遇到此錯誤
: Can't create asset from fonts/Gotham/Gotham-Bold.otf. Make sure you have passed in the correct path and file name.
java.lang.RuntimeException: Font asset not found fonts/Gotham/Gotham-Bold.otf
at android.graphics.Typeface.createFromAsset(Typeface.java:310)
at uk.co.chrisjenx.calligraphy.TypefaceUtils.load(:35)
at uk.co.chrisjenx.calligraphy.CalligraphyUtils.applyFontToTextView(:114)
at uk.co.chrisjenx.calligraphy.CalligraphyUtils.applyFontToTextView(:143)
at uk.co.chrisjenx.calligraphy.CalligraphyFactory.onViewCreatedInternal(:142)
at uk.co.chrisjenx.calligraphy.CalligraphyFactory.onViewCreated(:110)
另外我還添加了以下規則,因為我們都知道dexguard obsfucate文件
-keep class uk.co.chrisjenx.calligraphy。 {; -keep class uk.co.chrisjenx.calligraphy。 $ {; -keep class uk.co.chrisjenx.calligraphy。 {; }
但在我的情況下,它沒有奏效
任何幫助是值得贊賞的,雖然我嘗試刪除和添加字體,我也嘗試過.ttf格式以及.otf格式
嘗試在dexguard規則中對資產進行模糊處理。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.