草庐IT

RecyclerViewActions

全部标签

kotlin - 类型推断失败 : RecyclerViewActions. scrollTo()

来自java:onView(withId(R.id.recyclerView)).perform(RecyclerViewActions.scrollTo(hasDescendant(withText(artistResult.getNameVariations().get(0)))));尝试转换为Kotlin:onView(withId(R.id.recyclerView)).perform(RecyclerViewActions.scrollTo(hasDescendant(withText(artistResult.nameVariations[0]))))我得到了这个堆栈跟踪: