繁体   English   中英

书法字体未应用在使用dexguard的Android应用程序的发布版本中

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM