LogCat条目含义2

LogCat条目含义2,第1张

LogCat条目含义2
java.lang.NullPointerException    at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:394)ArrayAdapter<Comment> adapter =     new ArrayAdapter<Comment>(this, android.R.layout.simple_list_item_1, values);

values
其中至少有一个空对象,您不能拥有。


您可以通读源代码,并在此处看到这种情况:

T item = getItem(position);if (item instanceof CharSequence) {    text.setText((CharSequence)item);} else {    text.setText(item.toString()); // Line 394, when item is null this throws an NPE}


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5033927.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-11-15
下一篇 2022-11-15

发表评论

登录后才能评论

评论列表(0条)

保存