RecyclerView单击事件中的上下文未读取

问题描述

由于某些原因,尝试将点击侦听器应用于我的static async getInitialProps(ctx) { let product = [] const PostId = ctx.query.pid; await firebase.firestore() .collection('products') .doc(PostId) .collection('offers') .orderBy('position','asc') .get() .then(querySnapshot => { querySnapshot.forEach(doc => { console.log(doc.id," => ",doc.data()); }); return product }) .catch(error => { console.log('error',error) }) return {product: product[0]} } 项目以启动新活动时,无法读取我的RecyclerView适配器中的上下文。 RecyclerView返回“未解析的引用”错误。为了读取上下文,应将其更改为什么?我是否需要使用视图持有者或myContext.startActivity(intent)或其他内容的上下文?

未解决的参考:myContext

TextView

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)