title: java.lang.NoSuchMethodError: No static method
body: <p>I just start using RxJava in my projects, i have got this error : 
  <strong>java.lang.NoSuchMethodError: No static method getService()Lcom/app/seddik/yomii/api/GalleryPhotosService;</strong></p>
  
  <p>In this class the error has occured, and says :
   <strong>No static method getService()Lcom/app/seddik/yomii/api/GalleryPhotosService; in class Lcom/app/seddik/yomii/api/GalleryPhotosService; or its super classes (declaration of 'com.app.seddik.yomii.api.GalleryPhotosService' appears in /data/app/com.app.seddik.yomii-2/base.apk:classes27.dex)
                                                         at com.app.seddik.yomii.data.datasource.GalleryPhotosDataSource.(GalleryPhotosDataSource.java:40)</strong></p>
  
  <pre><code>public class GalleryPhotosDataSource extends ItemKeyedDataSource&lt;Integer, GalleryPhotosItems&gt; {
  
  private GalleryPhotosService galleryPhotosService;
  
  private CompositeDisposable compositeDisposable;
  
  private MutableLiveData&lt;NetworkState&gt; networkState = new MutableLiveData&lt;&gt;();
  
  private MutableLiveData&lt;NetworkState&gt; initialLoad = new MutableLiveData&lt;&gt;();
  
  /**
   * Keep Completable reference for the retry event
   */
  private Completable retryCompletable;
  
  GalleryPhotosDataSource(CompositeDisposable compositeDisposable) {
      this.galleryPhotosService = GalleryPhotosService.getService();
      this.compositeDisposable = compositeDisposable;
  }
  ....
  </code></pre>
  
  <p>The error appear in this line : </p>
  
  <pre><code>        this.galleryPhotosService = GalleryPhotosService.getService();
  </code></pre>
  
  <p>My gradle dependencies :</p>
  
  <pre><code> apply plugin: 'com.android.application'
   apply plugin: 'me.tatarka.retrolambda'
  
  android {
  compileSdkVersion 27
  buildToolsVersion "27.0.0"
  defaultConfig {
      applicationId "com.app.seddik.yomii"
      minSdkVersion 15
      targetSdkVersion 27
      versionCode 1
      versionName "1.0"
      multiDexEnabled true
      testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  }
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
  }
  compileOptions {
      sourceCompatibility JavaVersion.VERSION_1_8
      targetCompatibility JavaVersion.VERSION_1_8
  }
  }
  
  dependencies {
  compile fileTree(include: ['*.jar'], dir: 'libs')
  androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
      exclude group: 'com.android.support', module: 'support-annotations'
  
  })
  
  retrolambdaConfig 'net.orfjackal.retrolambda:retrolambda:2.5.1'
  // Support libraries
  compile 'com.android.support:appcompat-v7:27.1.0'
  compile 'com.android.support.constraint:constraint-layout:1.0.2'
  compile 'com.android.support:design:27.1.0'
  compile 'com.android.support:support-v4:27.1.0'
  // Retrofit
  compile 'com.squareup.retrofit2:retrofit:2.4.0'
  compile 'com.squareup.retrofit2:converter-gson:2.4.0'
  compile 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
  
  compile 'de.hdodenhof:circleimageview:2.2.0'
  compile 'com.android.support:recyclerview-v7:27.1.0'
  compile 'com.android.support:cardview-v7:27.1.0'
  // Glide
  compile 'com.github.bumptech.glide:glide:4.6.1'
  compile 'com.github.bumptech.glide:compiler:4.6.1'
  compile 'com.github.bumptech.glide:okhttp3-integration:4.6.1'
  compile 'com.squareup.picasso:picasso:2.5.2'
  // Others
  compile 'com.github.chrisbanes:PhotoView:2.1.3'
  compile 'com.github.varunest:sparkbutton:1.0.5'
  compile 'com.makeramen:roundedimageview:2.2.1'
  compile 'com.andkulikov:transitionseverywhere:1.7.8'
  compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.3.0'
  compile 'com.zhihu.android:matisse:0.4.3'
  compile 'com.seatgeek:placesautocomplete:0.3-SNAPSHOT'
  compile 'id.zelory:compressor:2.1.0'
  compile 'org.greenrobot:eventbus:3.1.1'
  compile 'com.github.florent37:shapeofview:1.1.2'
   // Firebase Messaging
  compile 'com.google.firebase:firebase-messaging:17.1.0'
  compile 'cn.pedant.sweetalert:library:1.3'
  compile 'com.android.support:multidex:1.0.1'
   //Google services
  compile 'com.google.android.gms:play-services-location:15.0.0'
  compile 'com.google.android.gms:play-services-places:15.0.0'
  
  // find bugs
  compile 'com.google.code.findbugs:jsr305:2.0.1'
  // Timber for logging
  compile 'com.jakewharton.timber:timber:4.6.1'
  //Architecture Components
  compile "android.arch.lifecycle:extensions:1.1.0"
  //Paging
  compile "android.arch.paging:runtime:1.0.1"
  //Rx
  compile 'io.reactivex.rxjava2:rxjava:2.2.0'
  compile  'io.reactivex.rxjava2:rxandroid:2.1.0'
  
  testCompile 'junit:junit:4.12'
  }apply plugin: 'com.google.gms.google-services'
  </code></pre>
  
  <p>This my interface Retrofit Service : </p>
  
  <pre><code>public interface GalleryPhotosService {
  
   // Retrofit services
  static GalleryPhotosService getService() {
      Retrofit retrofit = new Retrofit.Builder()
              .baseUrl(AppConfig.URL_UPLOAD_PHOTOS)
              .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
              .addConverterFactory(GsonConverterFactory.create())
              .build();
      return retrofit.create(GalleryPhotosService.class);
  }}
  </code></pre>