-1

I have this error and I can't resolve it, I looking for interhet but not working...

Error:Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzzf;

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.

com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException

   apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'


android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"
    defaultConfig {
        applicationId "sk.tipos.paradox02.citaj"
        minSdkVersion 11
        targetSdkVersion 23
        versionCode 26
        versionName '2.0021'
    }


    buildTypes {
        release {
            minifyEnabled false
            multiDexEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          //  signingConfig signingConfigs.release
        }

        debug {
            debuggable true
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt')
//            signingConfig signingConfigs.release
        }
    }


    productFlavors {
    }

    lintOptions {

        checkReleaseBuilds false

    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.0'
    compile 'com.android.support:design:23.1.0'
    compile 'com.google.android.gms:play-services-analytics:9.0.0'
    compile 'com.google.firebase:firebase-core:9.0.0'

    compile 'com.google.android.gms:play-services-ads:9.0.0'
    compile 'com.google.firebase:firebase-ads:9.0.0'
    compile 'com.google.android.gms:play-services-appindexing:9.0.0'
    compile 'com.google.android.gms:play-services:9.0.0'
    compile 'com.google.gms:google-services:3.0.0'
    compile 'com.google.firebase:firebase-crash:9.0.0'

    compile 'com.google.firebase:firebase-ads:10.0.1'



    compile 'com.android.support:design:23.0.0'
}

Error shown if I launch app. If rebuild project everything OK but when run project..

user7575308
  • 81
  • 4
  • 12

3 Answers3

0

You've got both version 10.0.1 and 9.0.0 of 'com.google.firebase:firebase-ads'.
Remove the 10.0.1 version, as everything else is 9.0.0 and they should always have the same version.

Moonbloom
  • 7,738
  • 3
  • 26
  • 38
  • i implemented this https://firebase.google.com/docs/admob/android/quick-start?hl=sk I copy new .json what i need to do for all 10.0.1 version google service? – user7575308 Feb 18 '17 at 13:14
0

This can be a lot of problems, but I believe this one is related to multidexing. You are enabling multidexing for the project and that's ok but this needs the multidex support library to be able to work on pre-Lolliopop.

Please add this to your dependencies

  compile 'com.android.support:multidex:1.0.1'
Ahmed Hegazy
  • 12,395
  • 5
  • 41
  • 64
0

you are have several duplicate versions of library, keep only what you need nothing extra, Even after removing the duplicate libraries you are facing this error then try enabling multidex

    android {
compileSdkVersion 21
buildToolsVersion "21.1.0"

defaultConfig {
    ...
    minSdkVersion 14
    targetSdkVersion 21
    ...

    // Enabling multidex support.
    multiDexEnabled true
}
...
}

dependencies {
compile 'com.android.support:multidex:1.0.0'
}

in manifest inside application tag

 <application

   android:name="android.support.multidex.MultiDexApplication">

  </application>

refer this

Community
  • 1
  • 1
Manohar
  • 22,116
  • 9
  • 108
  • 144