I'm building a WebView native app, provided by robotemplates. I encountered this build failure message when I try to build the APK:
Error:Execution failed for task ':mobile:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzfj.class
If anyone has a solution to the duplicate, please help.
Here's my build.gradle, happy to provide other information if needed:
apply plugin: "com.android.application"
repositories {
maven { url 'https://maven.google.com' }
}
dependencies
{
compile "com.android.support:support-compat:25.1.1"
compile "com.android.support:support-core-utils:25.1.1"
compile "com.android.support:support-core-ui:25.1.1"
compile "com.android.support:support-fragment:25.1.1"
compile "com.android.support:appcompat-v7:25.1.1"
compile "com.android.support:design:25.1.1"
compile "com.google.android.gms:play-services-base:10.0.1"
compile "com.google.android.gms:play-services-analytics:10.0.1"
compile "com.google.android.gms:play-services-ads:10.0.1"
compile "com.google.android.gms:play-services-gcm:10.0.1"
compile "com.google.android.gms:play-services-location:10.0.1"
compile "com.onesignal:OneSignal:3.4.3@aar"
compile (name:"config", ext:"aar")
compile fileTree(dir: "libs", include: ["*.jar"])
compile 'com.onesignal:OneSignal:[3.6.2, 3.99.99]'
compile 'com.android.support:multidex:1.0.1'
}
...
apply plugin: 'com.google.gms.google-services'
Here's my other build.gradle:
buildscript {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
flatDir {
dirs 'libs'
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.14.1'
}
(I'm a newbie, please bear with me as I'm figuring out multiple errors)