小编Ken*_*Tan的帖子

AppCompatTextView无法实例化

我在确定如何解决此错误时遇到问题.
我尝试使缓存/重启无效,释放磁盘空间并重新安装Android Studio.

The following classes could not be instantiated:
    - android.support.v7.widget.AppCompatTextView(Open Class, Show Exception, Clear Cache)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE.If this is an unexpected error you can also
try to build the project, then manually refresh the layout.Exception Details java.lang.NullPointerException
    at android.content.res.Resources_Delegate.getValue(Resources_Delegate.java: 788)   
    at android.content.res.Resources.getValue(Resources.java: 1286)   
    at android.support.v4.content.res.ResourcesCompat.loadFont(ResourcesCompat.java: 212)   
    at android.support.v4.content.res.ResourcesCompat.getFont(ResourcesCompat.java: 206)   
    at android.support.v7.widget.TintTypedArray.getFont(TintTypedArray.java:119)   
    at android.support.v7.widget.AppCompatTextHelper.updateTypefaceAndStyle(AppCompatTextHelper.java:208)   
    at android.support.v7.widget.AppCompatTextHelper.loadFromAttributes(AppCompatTextHelper.java:152)   
    at android.support.v7.widget.AppCompatTextHelperV17.loadFromAttributes(AppCompatTextHelperV17.java:38)   
    at android.support.v7.widget.AppCompatTextView. < init …
Run Code Online (Sandbox Code Playgroud)

android

11
推荐指数
1
解决办法
3417
查看次数

标签 统计

android ×1