title: Lambda expressions - can not set lambda parameter as argument to method
body: <p>I'm trying use lambda expressions on Android using <strong>retrolambda</strong>. In code below I need to add listener that is interface:</p>
  
  <pre><code> public interface LoginUserInterface {
  
          void onLoginSuccess(LoginResponseEntity login);
  
          void onLoginFail(ServerResponse sr);
      }
  </code></pre>
  
  <p>code</p>
  
  <pre><code> private void makeLoginRequest(LoginRequestEntity loginRequestEntity) {
          new LoginUserService(loginRequestEntity)
                  .setListener(
                          login -&gt; loginSuccess(login),
                          sr -&gt; loginFail(sr))
                  .execute();
      }
  
   private void loginSuccess(LoginResponseEntity login) {
           //TODO loginSuccess
      }
  
   private void loginFail(ServerResponse sr) {
          //TODO loginFail
      }
  </code></pre>
  
  <p>But Android Studio marks red <strong>loginSuccess(<em>login</em>)</strong> and <strong>loginFail(<em>sr</em>)</strong> as mistakes 
  and shows message "<em>LoginResponseEntity cannot be applied to </em>" and "<em>ServerResponse cannot be applied to </em>"
  <br>
  So I can not set lambda parameter '<strong>login</strong>' as argument to method <strong>loginSuccess(login)</strong>.<br>
  Please help me to understand what's wrong with this expression.</p>