Caused by: java.lang.RuntimeException: Font asset not found fonts/SYFZLTKHJW.TTF
/*** 通过反射方法设置app全局字体*/public void setTypeface() {typeFace = Typeface.createFromAsset(getAssets(), "fonts/SYFZLTKHJW.TTF");try {Field field = Typeface.class.getDeclaredField("SERIF");field.setAccessible(true);field.set(null, typeFace);} catch (NoSuchFieldException e) {e.printStackTrace();} catch (IllegalAccessException e) {e.printStackTrace();}}
08-22 18:50:22.778 27533-27533/com.moreunion.zhenghao E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.moreunion.zhenghao, PID: 27533
java.lang.RuntimeException: Unable to create application com.moreunion.zhenghao.app.BaseApplication: java.lang.RuntimeException: Font asset not found fonts/SYFZLTKHJW.TTF
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5678)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1637)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6524)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)
Caused by: java.lang.RuntimeException: Font asset not found fonts/SYFZLTKHJW.TTF
at android.graphics.Typeface.createFromAsset(Typeface.java:228)
at com.moreunion.zhenghao.app.BaseApplication.setTypeface(BaseApplication.java:121)
at com.moreunion.zhenghao.app.BaseApplication.onCreate(BaseApplication.java:34)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1028)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5659)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1637)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6524)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)
原因:
没有添加assets/fonts/SYFZLTKHJW.TTF文件
Caused by: java.lang.RuntimeException: Font asset not found fonts/SYFZLTKHJW.TTF相关推荐
- 【Flink异常】Caused by: java.lang.RuntimeException: Row arity of from does not match serializers
文章目录 1. 异常详情 2. 分析原因 3. 解决办法 1. 异常详情 Caused by: java.lang.RuntimeException: Row arity of from does n ...
- 解决Caused by: java.lang.RuntimeException: Error parsing Mapper XML. Cause: java.lang.IllegalArgument
运行项目出现:Caused by: java.lang.RuntimeException: Error parsing Mapper XML. Cause: java.lang.IllegalArgu ...
- Caused by: java.lang.RuntimeException: can not run elasticsearch as root
爆报错截图如下:此错误是在centos7中启动elasticsearch6.0是报的错,原因报错中也已经写明是因为elasticsearch不能用root用户启动,解决方法如下:1.需要新建个用户组与 ...
- azkaban 与 java任务_azkaban任务报错java.lang.RuntimeException: The root scratch dir: /tmp/hive...
azkaban运行任务的时候失败报错如下: 23-03-2016 08:16:14 CST analyzer-kafka2hdfs_new ERROR - Exception in thread &q ...
- ibatis sql_Map中出现异常:Cause: java.lang.RuntimeException: JavaBeansDataExchange could not instantiate..
sql_map 原始配置 <select id="getContacts" parameterClass="Java.util.Map" resultCl ...
- jenkins配置报错,javax.servlet.ServletException: java.lang.RuntimeException: ssh executable not found.
jenkins定时构建配置时报javax.servlet.ServletException: java.lang.RuntimeException: ssh executable not found. ...
- java.lang.RuntimeException: Manifest merger failed with multiple errors
解决方案 打开资源文件 点击下面的Merged Manifest 这时你会看到具体报错信息,修改掉即可 Manifest merger failed 的意思是清单文件合并错误,首先是可以定位Andro ...
- Hive启动报错 java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang
Hive启动报错 [lili@hadoop102 hive]$ bin/hive which: no hbase in (/usr/lib64/qt-3.3/bin:/usr/local/bin:/b ...
- Java.lang.RuntimeException: org.codehaus.plexus.component.repository.exception.ComponentLookupExcept
项目在新电脑配置后,maven不能下载依赖,刷新提示以下错误: java.lang.RuntimeException: java.lang.RuntimeException: org.codehaus ...
最新文章
- linux 系统调用分析
- CCNA学习笔记12---黄毛丫头篇(访问控制列表)
- linux 终端与shell输出大小不匹配
- Bootstrap3 表格的情景类
- centos8 安装nvidia 显卡驱动(一路踩坑一路填)
- 《ES6标准入门》学习笔记
- 力扣-64 最小路径和
- 2022年茶艺师(中级)考试题及茶艺师(中级)考试技巧
- 松翰单片机数码管c语言,松翰单片机数码管程序
- 2.3Linux中的日志管理
- Linux命令行下删除文件内容
- 题解:补♂课第110场
- CMake编译Nginx源码
- 北大操作系统陈向群第七章知识点
- PowerBI指标拆解分析可视化
- SITA 2015航空行李报告:新技术降低错运率
- 【接前篇】进阶的KMP
- kali linux 2020-2 安装中文输入法
- 《Shell Programming in Unix, Linux and OS X, 4th Edition 》 笔记之Decisions,Decisions
- 详解React的Transition工作原理原理
热门文章
- laravel entrust 权限管理
- Ucase()函数和Lcase()函数
- [区块链]区块链技术在殡葬行业的思考
- 博达交换机S2528PB常用配置命令
- Cuda相关的函数数
- 【系统分析师之路】第七章 复盘系统设计(业务流程建模)
- Android Execution failed for task ‘:app:mergeDebugResources‘.
- 云原生|kubernetes|centos下安装部署kubeapps以及简单的使用示例
- Python编写尼姆游戏
- 文件夹配额linux,Linux磁盘配额