Android: Application crashes because of presenter error?

107 Views Asked by At

I'm try to develop an android app in Kotlin. I'm using an MVP design pattern. Unfortunately, the application crashes due to an error in the presenter. Below the screenshot of the logcat and you can check my code at Github.

Could anyone please help me?

Thank you.

LogCat

1

There are 1 best solutions below

3
On

you are declaring:

private lateinit var swipeRefresh: SwipeRefreshLayout 

then re-declare the same variable in onActivtyCreated:

val swipeRefresh = rootView.findViewById<SwipeRefreshLayout>(R.id.swipe_refresh)

try to delete val to use the class variable swipeRefresh.