java.lang.RuntimeException: native typeface cannot be made

设置字体出错:

txt.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/luculent"));

然后发现,竟然是因为自己没有加上后缀,改成下面这样就好了

txt.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/luculent.ttf"));

出这个错误了先看看名字有没有写全

java.lang.RuntimeException: native typeface cannot be made

时间: 2024-10-29 04:34:43

java.lang.RuntimeException: native typeface cannot be made的相关文章

解决Android studio 启动报错java.lang.RuntimeException: java.lang.IllegalArgumentException

报错内容 Internal error. Please report to https://code.google.com/p/android/issues java.lang.RuntimeException: java.lang.IllegalArgumentException: Argument for @NotNull parameter 'name' of com/android/tools/idea/welcome/Platform.<init> must not be null 

resin WED服务器初用遇到的问题和解决方法 java.lang.RuntimeException: java.net.SocketException: Unrecognized Windows Socke ts error: 0: JVM_Bind

开启resin 服务器以后提示如下:(控制台不断的循环循环打印如下错误提示) java.lang.RuntimeException: java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind at com.caucho.server.cluster.Server.start(Server.java:1191) at com.caucho.server.cluster.Cluster.startServer(

hive 报错 java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient

Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:344) at org.a

eclipse 4 rcp开发: java.lang.RuntimeException: No application id has been found.

eclipse 4.2.x (June )rcp + E4:http://download.eclipse.org/e4/updates/0.12 自带windowbuilder 1.2 e4 css spy +e4 tools:建立一个默认的E4 application: 建立好后,直接执行: 错误详情: java.lang.RuntimeException: No application id has been found.at org.eclipse.equinox.internal.ap

[JAVA][RCP]Clean project之后报错:java.lang.RuntimeException: No application id has been found.

Clean了一下Project,然后就报了如下错误 !ENTRY com.release.nattable.well_analysis 2 0 2015-11-20 17:04:44.609 !MESSAGE Could not resolve module: com.release.nattable.well_analysis [72] Unresolved requirement: Import-Package: org.eclipse.nebula.widgets.nattable.dat

hive脚本出现Error: java.lang.RuntimeException: Error in configuring object和Caused by: java.lang.IndexOutOfBoundsException: Index: 9, Size: 9

是在reduce阶段报的错误,详细错误信息是 朱传豪 19:04:48 Diagnostic Messages for this Task: Error: java.lang.RuntimeException: Error in configuring object at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:109) at org.apache.hadoop.util.ReflectionU

hive Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

Exception in thread "main" java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient    at org.apache.hadoop.hive

java.lang.RuntimeException: Cannot create a secure XMLInputFactory 异常处理

背景:本人在近日的webservice   CXF接口的编写调试过程中,发现一个很奇怪的现象--我在本地对接口进行往返请求时完全没有问题,不管是main方法直接调用还是业务场景里调用都无问题,在其他同事的电脑上测试也均无问题,但只要一部署到服务器上,即报错.尝试本地更换与线上同版本的tomcat.尝试重新更新所有class文件.尝试替换线上服务器的所有jar后均无法解决问题.现附上报错代码及后续所得解决方案: 1.报错: 报错:[ERROR] 2017-09-23 12:18:45,973 co

我的Android进阶之旅------&gt;Android中MediaRecorder.stop()报错 java.lang.RuntimeException: stop failed.

今天在调用MediaRecorder.stop(),报错了,java.lang.RuntimeException: stop failed. E/AndroidRuntime(7698): Cause by: java.lang.RuntimeException: stop failed. E/AndroidRuntime(7698): at android.media.MediaRecorder.stop(Native Method) E/AndroidRuntime(7698): at co