The book states:
// 3
@Query(“SELECT * FROM Bookmark WHERE id = :arg0”)
fun loadBookmark(bookmarkId: Long): Bookmark
@Query(“SELECT * FROM Bookmark WHERE id = :arg0”)
fun loadLiveBookmark(bookmarkId: Long): LiveData
In Android Studio 3.3 this produces the error ‘Cannot resolve symbol arg0’.
P 307 states “Note: A bug in the current Kotlin implementation requires the use of the :arg# syntax. Once this bug is fixed, you’ll be able to use the actual names of the method arguments.”
I replaced with the code below, and the error disappeared, but grateful for confirmation :
@Query(“SELECT * FROM Bookmark WHERE id = :bookmarkId”)
fun loadBookmark(bookmarkId: Long): Bookmark