Kotlin and new ActivityTestRule : The @Rule must be public
JUnit allows providing rules through a test class field or a getter method. What you annotated is in Kotlin a property though, which JUnit won’t recognize. Here are the possible ways to specify a JUnit rule in Kotlin: Through an annotated getter method From M13, the annotation processor supports annotation targets. When you write @Rule … Read more