I am new to android development. I am targeting API level 22 and with the following code, the app crashes:
Consumer<String> onError = new Consumer<String>(){
public void accept(String t){
}
}
I tried with a custom class implementing this interface and still the same behavior. Can someone explain it why.