After I implemented the class MapsViewModel the application always crashed after the installing process.
The error is java.lang.RuntimeException: Cannot create an instance of the class …placebook.viewmodel.MapsViewModel at android.arch.lifecycle.ViewModelProvider$AndroidViewModelFactory.create(ViewModelProvider.java:207).
I thought it was my fault, but I compile the final version of the Chapter 16, and I got the same error, then I compile the final versión of the Chapter 17, 18 and 19, and I got the same error.
I am using the Android Studio 3.2, Kotlin plugin 1.2.71 and targetSdkVersion 28 (Oreo 8.1).
I found that the application crashed when it executes private var bookmarkRepo: BookmarkRepo = BookmarkRepo(getApplication()).
I will continue with the research.
Thanks for any help.