When exporting your apk file you might come across this error if using version 1.4 of the city guide template:

Duplicate jar entry [com/google/android/gms/internal/g/c.class]

The app will work in debug mode but will not export. 


Reason

The reason for this is proguard, thus we can fix this by turning it off and leave the minifyEnable on.


Fix

Add the following in build.gradle line 22:

useProguard false


It will look like this:

android {
    compileSdkVersion 28
    buildToolsVersion '28.0.3'

    defaultConfig {
        applicationId "com.neurondigital.cityguide"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 4
        versionName "1.4"
    }
    buildTypes {
        debug {
            minifyEnabled true
            useProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
        }
        release {
            minifyEnabled true
            useProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}


or use version 1.4.2 of the template