无法在Android中使用RecyclerView运行应用程序

无法在Android中使用RecyclerView运行应用程序,android,listview,android-recyclerview,android-adapter,Android,Listview,Android Recyclerview,Android Adapter,我是android开发的新手,我正在尝试使用RecyclerView。我遵循了一些教程和Google文档,但当我试图在活动中使用适配器时,同样的错误总是发生 String.valueOf(myadaptordata.get(position).second.first.intValue()) mrec.setAdapter(madap);这行有错误 String.valueOf(myadaptordata.get(position).second.first.intValue()) 问题出在

我是android开发的新手,我正在尝试使用RecyclerView。我遵循了一些教程和Google文档,但当我试图在活动中使用适配器时,同样的错误总是发生

String.valueOf(myadaptordata.get(position).second.first.intValue())
mrec.setAdapter(madap);这行有错误

String.valueOf(myadaptordata.get(position).second.first.intValue())

问题出在这一行:

holder.money.setText(myadaptordata.get(position).second.first.intValue())
String.valueOf(myadaptordata.get(position).second.first.intValue())
这是一个整数值。你应该使用

String.valueOf(myadaptordata.get(position).second.first.intValue())

问题出在这一行:

holder.money.setText(myadaptordata.get(position).second.first.intValue())
String.valueOf(myadaptordata.get(position).second.first.intValue())
这是一个整数值。你应该使用

String.valueOf(myadaptordata.get(position).second.first.intValue())
holder.money.setText(myadaptordata.get(position.second.first.intValue())

String.valueOf(myadaptordata.get(position).second.first.intValue())
抛出资源$NotFoundException,因为

String.valueOf(myadaptordata.get(position).second.first.intValue())
myAdapterData.get(position).second.first.intValue()
返回一个
int
,而方法需要一个
CharSequence
作为参数

String.valueOf(myadaptordata.get(position).second.first.intValue())

要解决此问题,请将其更改为:

String.valueOf(myadaptordata.get(position).second.first.intValue())
holder.money.setText(String.valueOf(myadaptordata.get(position).second.first.intValue()));

String.valueOf(myadaptordata.get(position).second.first.intValue())
holder.money.setText(myadaptordata.get(position.second.first.intValue())

String.valueOf(myadaptordata.get(position).second.first.intValue())
抛出资源$NotFoundException,因为

String.valueOf(myadaptordata.get(position).second.first.intValue())
myAdapterData.get(position).second.first.intValue()
返回一个
int
,而方法需要一个
CharSequence
作为参数

String.valueOf(myadaptordata.get(position).second.first.intValue())

要解决此问题,请将其更改为:

String.valueOf(myadaptordata.get(position).second.first.intValue())
holder.money.setText(String.valueOf(myadaptordata.get(position).second.first.intValue()));

String.valueOf(myadaptordata.get(position).second.first.intValue())

您得到的错误是什么?发布堆栈跟踪或错误日志您得到的错误是什么?发布堆栈跟踪或错误日志