Skip to content Skip to sidebar Skip to footer

One Type Argument Expected For Class Result

I'm new to Kotlin and I do not quite understand what to do in some cases. Here I need to plug my own class 'Result', but I do not know how to do that. @get:Rule val taskEx

Solution 1:

Result expects a type argument (see the docs), so if, for instance, the type of the result in your case is Note, you should change the declaration to:

private val notesLiveData =MutableLiveData<Result<Note>>()

Solution 2:

I just needed to specify the path to this file myself through import

Post a Comment for "One Type Argument Expected For Class Result"