title: NoSuchMethodError On Completable RXJava2
body: <p>Good day all, am trying to use RxJava2 in the following code but i keep getting the following java.lang.NoSuchMethodError: No static method.</p>
  
  <p>Here is my code:</p>
  
  <pre><code> userAccount.startUserSession(String.valueOf(id), authkey)     
  
  .andThen(userAccount.getUser())         
  
      .map(userAccount -&gt; {     userAccount.setToken(accessToken);       
                 return userAccount;
               })            
  
      .flatMapCompletable(userAccount -&gt; userAccount.update(userAccount))
  
      .subscribe(() -&gt;{},
  
      throwable -&gt; {});
  </code></pre>
  
  <p>This is the UserAccount:</p>
  
  <pre><code>               @Override
                  public Completable startUserSession(String clientId, String key) {
  
                         return Completable.fromCallable(() -&gt; {
  
                                 registerAccount(clientId, key);
  
                                 return null;
  
                         });
                  }
  
  
          @Override
                       public Observable&lt;UserAccount&gt; getUser() {          
  
  
          return Observable.create(this::getAvailableAccounts)       
  
                .flatMap(Observable::fromArray)         
  
           .map(this::getUserAccount);
  
        }
  
  
          private void getAvailableAccounts(Emitter&lt;Account[]&gt; emitter) {       
  
           try {                     
          emitter.onNext(getAccountsByType());                    
          emitter.onComplete();             
           } catch (NoSuchElementException throwable){                     emitter.onError(throwable);                
           }             
          }                          
  
          private void registerAccount(String clientId,String key)throws Exception{            
  
                        
      if (getAccountsByType().length &gt; 0) {                 
              //do something like throw exception                
           }                 
          Account account = new Account(key, accountType);       
            accountManager.addAccountExplicitly(account, null, null);        
          accountManager.setUserData(account, CLIENT_KEY_ID, clientId);       
       accountManager.setUserData(account, CLIENT_AUTHENTICATION_KEY, key);             
              ContentResolver.setIsSyncable(account, Authority, 1);      
         ContentResolver.setSyncAutomatically(account, Authority, true);      
      ContentResolver.addPeriodicSync(account, Authority, new Bundle(), 1);
  
      } 
  
          @Override             
          public Completable update(UserAccount userAccount) {         
  
  
           return Completable.create(completableEmitter -&gt; {        
                   updateUserAccount(userAccount, completableEmitter);       
  
           });
  
        private void updateUserAccount(UserAccount userAccount,CompletableEmitter completableEmitter) {        
  
  
          try {              
          updateAccount(userAccount);         
  
          completableEmitter.onComplete();         
  
          } catch (AccountException uax) {           
  
           completableEmitter.onError(uax);             
  
            }        
       }
  
          private void updateAccount(UserAccount userAccount)throws AccountException {          
  
                              
          Account account = getAccountsByType()[0];         
  
          UserAccount mainUser = getUserAccount(account);          
  
          if(mainUser.getUserId().equals(userAccount.getUserId())) {        
                   accountManager.setUserData(account, 
  CLIENT_AUNTHENTICATION_TOKEN, userAccount.getToken());           
  
           } else {           
  
           // do something like throw an exception                
           }
  
          }        
                    
          private UserAccount getUserAccount(Account account) {          
  
  
           UserAccount userAccount = new
          UserAccount(accountManager.getUserData(account, CLIENT_KEY));     
  
          String token = accountManager.getUserData(account, CLIENT_TOKEN);     
  
          if (token != null &amp;&amp; !token.isEmpty()) {       
                userAccount.setToken(token);        
  
           }         
  
          return userAccount;
  
          }
  </code></pre>
  
  <p>the methods both return a completable apart from userAccount.getuser() which returns an Observable. Am a bit confused what could be triggering it. Any Ideas.</p>
  
  <p>This is my error log:</p>
  
  <pre><code>     java.lang.NoSuchMethodError: No static method com_data_useraccount_UserAccountManager$$Lambda$1_lambda$startUserSession$0(Lcom/data/useraccount/UserAccountManager;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; in class Lcom/data/useraccount/UserAccountManager; or its super classes (declaration of 'com.data.useraccount.UserAccountManager' appears in /data/app/com.example-1/base.apk)
  
          at com.data.useraccount.UserAccountManager$$Lambda$1.call(Unknown Source)
  
          at
       io.reactivex.internal.operators.completable.CompletableFromCallable.subscribeActual(CompletableFromCallable.java:35)
  
        at io.reactivex.Completable.subscribe(Completable.java:1592)
  
      at io.reactivex.internal.operators.completable.CompletableToObservable.subscribeActual(CompletableToObservable.java:29)
  
          at io.reactivex.Observable.subscribe(Observable.java:10514)
  
      at io.reactivex.internal.operators.observable.ObservableDelaySubscriptionOther.subscribeActual(ObservableDelaySubscriptionOther.java:94)
  
      at io.reactivex.Observable.subscribe(Observable.java:10514)
  
      at io.reactivex.internal.operators.observable.ObservableMap.subscribeActual(ObservableMap.java:32)
  
      at io.reactivex.Observable.subscribe(Observable.java:10514)
  
       at io.reactivex.internal.operators.observable.ObservableFlatMapCompletableCompletable.subscribeActual(ObservableFlatMapCompletableCompletable.java:49)
  
      at io.reactivex.Completable.subscribe(Completable.java:1592)
  
      at io.reactivex.internal.operators.completable.CompletableObserveOn.subscribeActual(CompletableObserveOn.java:34)
  
      at io.reactivex.Completable.subscribe(Completable.java:1592)
  
       at io.reactivex.internal.operators.completable.CompletableSubscribeOn$SubscribeOnObserver.run(CompletableSubscribeOn.java:64)
  
      at io.reactivex.Scheduler$1.run(Scheduler.java:134)
  
      at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:59)
  
      at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:51)
  
      at java.util.concurrent.FutureTask.run(FutureTask.java:237)
  
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
  
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
  
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
  
  
     at java.lang.Thread.run(Thread.java:761)
  </code></pre>