Android:应用程序因演示者错误而崩溃?

时间:2018-10-06 02:57:14

标签: android kotlin mvp presenter

我正在尝试在Kotlin中开发一个Android应用。我正在使用 MVP设计模式。不幸的是,由于演示者中的错误,应用程序崩溃了。在logcat的屏幕截图下方,您可以在Github处查看我的代码。

有人可以帮助我吗?

谢谢。

LogCat

1 个答案:

答案 0 :(得分:1)

您要声明:

<a href={`https://${ this.props.info }`} aria-label={`${ this.props.name }`} target="_blank" rel="noopener noreferrer">
   <i className="fa fa-circle fa-stack-2x"></i>
   <i className={ `fa fa-${ this.props.icon } fa-stack-1x fa-inverse` }></i>
</a>

然后在private lateinit var swipeRefresh: SwipeRefreshLayout 中重新声明相同的变量:

onActivtyCreated

尝试删除val swipeRefresh = rootView.findViewById<SwipeRefreshLayout>(R.id.swipe_refresh) 以使用类变量val

相关问题