title: Android dependencies inconsitant
body: <p>I am using firebase database and have updated my dependencies.</p>
  
  <pre><code>dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  testCompile 'junit:junit:4.12'
  compile 'com.android.support:appcompat-v7:24.0.0'
  compile 'com.android.support:support-v4:24.0.0'
  compile 'com.firebase:firebase-client-android:2.3.1'}
  </code></pre>
  
  <p>I keep getting the following error:</p>
  
  <blockquote>
    <p>A/FirebaseApp: Firebase API initialization failure.
                                                                   java.lang.reflect.InvocationTargetException
                                                                       at java.lang.reflect.Method.invoke(Native Method)
                                                                       at java.lang.reflect.Method.invoke(Method.java:372)
                                                                       at com.google.firebase.FirebaseApp.zza(Unknown Source)
                                                                       at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
                                                                       at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
                                                                       at com.google.firebase.FirebaseApp.zzbu(Unknown Source)
                                                                       at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)
                                                                       at android.content.ContentProvider.attachInfo(ContentProvider.java:1696)
                                                                       at android.content.ContentProvider.attachInfo(ContentProvider.java:1671)
                                                                       at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
                                                                       at android.app.ActivityThread.installProvider(ActivityThread.java:5045)
                                                                       at android.app.ActivityThread.installContentProviders(ActivityThread.java:4630)
                                                                       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4570)
                                                                       at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
                                                                       at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:729)
                                                                       at android.app.ActivityThread.handleBindApplication()
                                                                       at android.app.ActivityThread.access$1600(ActivityThread.java:154)
                                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1383)
                                                                       at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                       at android.os.Looper.loop(Looper.java:135)
                                                                       at android.app.ActivityThread.main(ActivityThread.java:5300)
                                                                       at java.lang.reflect.Method.invoke(Native Method)
                                                                       at java.lang.reflect.Method.invoke(Method.java:372)
                                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
                                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
                                                                       at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:133)
                                                                    Caused by: java.lang.IncompatibleClassChangeError: The method 'java.io.File android.support.v4.content.ContextCompat.getNoBackupFilesDir(android.content.Context)' was expected to be of type virtual but instead was found to be of type direct (declaration of 'java.lang.reflect.ArtMethod' appears in /system/framework/core-libart.jar)
                                                                       at com.google.firebase.iid.zzg.zzeC(Unknown Source)
                                                                       at com.google.firebase.iid.zzg.(Unknown Source)
                                                                       at com.google.firebase.iid.zzg.(Unknown Source)
                                                                       at com.google.firebase.iid.zzd.zzb(Unknown Source)
                                                                       at com.google.firebase.iid.FirebaseInstanceId.getInstance(Unknown Source)
                                                                       at java.lang.reflect.Method.invoke(Native Method) 
                                                                       at java.lang.reflect.Method.invoke(Method.java:372) 
                                                                       at com.google.firebase.FirebaseApp.zza(Unknown Source) 
                                                                       at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) 
                                                                       at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) 
                                                                       at com.google.firebase.FirebaseApp.zzbu(Unknown Source) 
                                                                       at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source) 
                                                                       at android.content.ContentProvider.attachInfo(ContentProvider.java:1696) 
                                                                       at android.content.ContentProvider.attachInfo(ContentProvider.java:1671) 
                                                                       at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source) 
                                                                       at android.app.ActivityThread.installProvider(ActivityThread.java:5045) 
                                                                       at android.app.ActivityThread.installContentProviders(ActivityThread.java:4630) 
                                                                       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4570) 
                                                                       at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method) 
                                                                       at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:729) 
                                                                       at android.app.ActivityThread.handleBindApplication() 
                                                                       at android.app.ActivityThread.access$1600(ActivityThread.java:154) 
                                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1383) 
                                                                       at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                       at android.os.Looper.loop(Looper.java:135) 
                                                                       at android.app.ActivityThread.main(ActivityThread.java:5300) 
                                                                       at java.lang.reflect.Method.invoke(Native Method) 
                                                                       at java.lang.reflect.Method.invoke(Method.java:372) 
                                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904) 
                                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699) 
                                                                       at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:133) </p>
    
    <p>E/FA: Task exception on worker thread: java.lang.IncompatibleClassChangeError: The method 'java.io.File android.support.v4.content.ContextCompat.getNoBackupFilesDir(android.content.Context)' was expected to be of type virtual but instead was found to be of type direct (declaration of 'java.lang.reflect.ArtMethod' appears in /system/framework/core-libart.jar): com.google.android.gms.measurement.internal.zzt.zzEd(Unknown Source)</p>
  </blockquote>
  
  <p>But if I change these dependencies back to version 23 instead of 24 and run after rebuilding gradle:</p>
  
  <pre><code>dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  testCompile 'junit:junit:4.12'
  compile 'com.android.support:appcompat-v7:23.0.0'
  compile 'com.android.support:support-v4:23.0.0'
  compile 'com.firebase:firebase-client-android:2.3.1'}
  </code></pre>
  
  <p>I dont get the above error but still get:</p>
  
  <p>D/FirebaseInstanceId: background sync failed: SERVICE_NOT_AVAILABLE</p>
  
  <p>Everything was working fine untill I updated android studio</p>
  
  <p>The complete build, gradle looks like the following:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  apply plugin: 'com.google.gms.google-services'
  android {
  compileSdkVersion 23
  buildToolsVersion "24.0.0"
  
  
  defaultConfig {
      applicationId "pvn.com.locanews"
      minSdkVersion 19
      targetSdkVersion 23
      versionCode 1
      versionName "1.0"
  }
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
  }
  packagingOptions {
      exclude 'META-INF/LICENSE'
      exclude 'META-INF/LICENSE-FIREBASE.txt'
      exclude 'META-INF/NOTICE'
  }}dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  testCompile 'junit:junit:4.12'
  compile 'com.android.support:appcompat-v7:24.0.0'
  compile 'com.android.support:support-v4:24.0.0'
  compile 'com.firebase:firebase-client-android:2.3.1'}
  </code></pre>
  
  <p>Stuck..............</p>