0
我的代碼在一天前被罰款的工作,但現在我特別錯誤的應用程序崩潰,當我嘗試使用填充我TextView
裏面的html文本我使用的Android 4.4的Jellybean的NoClassDefFoundError Html.fromHtml的Android
Exception: E/UncaughtException: java.lang.NoClassDefFoundError: android/text/Html$HtmlParser
if (Build.VERSION.SDK_INT >= 24) {
holder.desc.setText(Html.fromHtml(desc, Html.FROM_HTML_MODE_LEGACY));
holder.title.setText(Html.fromHtml(title, Html.FROM_HTML_MODE_LEGACY));
} else {
//this is where i am getting exception
holder.desc.setText(Html.fromHtml(desc));
holder.title.setText(Html.fromHtml(title));
}