Generate Signed APK Error: Error converting bytecode to dex and 1 more
<p>When I Clean/Rebuild my project or even run app, It doesn't return any errors. But when I generate signed APK, It returns two errors. </p>

<pre><code>Error:Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzox;
</code></pre>

<p>And this one</p>

<pre><code>    Error:Execution failed for task ':app:transformClassesWithJarMergingForRelease'.
&gt; com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzd.class
</code></pre>

<p>Below is the code from <code>build.gradle</code> file.</p>

<pre><code>apply plugin: 'com.android.application'


android {
    compileSdkVersion 24
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "com.wildlife.dbd"
        minSdkVersion 16
        targetSdkVersion 24
        versionCode 10
        versionName "2.2.2"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

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

dependencies
{
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:24.0.0'
    compile 'com.android.support:design:24.0.0'

    // FB Ads
    compile 'com.facebook.android:audience-network-sdk:4.10.0'

    // Analytics
    compile 'com.google.android.gms:play-services-analytics:9.0.0'
}
</code></pre>