Я запускаю приведенный ниже код и получаю ошибку при возврате чего-либо();
error: incompatible types
required: Matcher <View>
found: Matcher <Object>
/**
* Perform action of waiting until UI thread is free. <p/> E.g.: onView(isRoot()).perform(waitUntilIdle());
* @return
*/
public static ViewAction waitUntilIdle(){
return new ViewAction(){
@Override public Matcher<View> getConstraints(){
return anything();
}
@Override public String getDescription(){
return "wait until UI thread is free";
}
@Override public void perform( final UiController uiController, final View view){
uiController.loopMainThreadUntilIdle();
}
}
;
}
Любые идеи?
return (Matcher<View> )anything()
. - person Umer Farooq   schedule 21.10.2015Matcher<View> temp = new Matcher(); for(Object view : Matcher<Object>) temp.add((View)view); return temp;
- person Umer Farooq   schedule 21.10.2015SelfDescribing
. Я спрашиваю, является ли Matcher‹?› ArrayList, hashmap, набором? - person Umer Farooq   schedule 21.10.2015