0
  apply plugin: 'com.android.application'

    android {


      compileSdkVersion 23
buildToolsVersion "23.0.0"

defaultConfig {

        minSdkVersion 13
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"

    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_6
        targetCompatibility JavaVersion.VERSION_1_6
    }


    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/BCKEY.DSA'
        exclude 'AUTHORS'
    }

}

    dependencies {
provided fileTree(include: ['*.jar'], dir: 'libs')

compile 'com.firebase:firebase-client-android:2.3.1+'

compile 'com.google.firebase:firebase-crash:9.0.0'

compile 'com.google.android.gms:play-services:9.0.0'

compile 'com.jakewharton:butterknife:8.0.1'

}
Saurabh Vardani
  • 1,821
  • 2
  • 18
  • 33

2 Answers2

0

This problem can be solved either by cleaning the project, and removing some unused libraries and methods from dependencies in build.gradle, OR by adding multidex support.

    defaultConfig {        
        // Enabling multidex support.
        multiDexEnabled true
        minSdkVersion 13
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
Saurabh Vardani
  • 1,821
  • 2
  • 18
  • 33
0

This can be because of following reason:

  1. one of the jar files inside project was using an older version of google play services.
  2. use multiDexEnabled true in defaultconfig
  3. Be specific with classes you add in dependencies. like

    compile 'com.google.android.gms:play-services-maps:8.4.0'

    Not like compile 'com.google.android.gms:play-services:+'

Dipali Shah
  • 3,742
  • 32
  • 47