The android project is running properly on emulator but not on any real device. Is there some error in build.gradle tried to figure it out by using
android {
...
configurations {
all*.exclude group: 'com.android.support', module: 'support-v4'
}
}
but nothing happened also enabled multiDexEnabled true
but getting same error
Here is my build.gradle
file
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "24.0.3"
defaultConfig {
applicationId "com.theakshaynaik.pocketambulance"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.firebaseui:firebase-ui:0.5.1'
compile 'com.google.android.gms:play-services:9.6.1'
testCompile 'junit:junit:4.12'
compile files('libs/httpclient-4.0.3.jar')
compile 'com.android.support:multidex:1.0.0'
}
apply plugin: 'com.google.gms.google-services'
The error which I am getting is
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v4/os/ParcelableCompat.class
It consist of error ParcelableCompat.class and even I have looked for solution but not able to fix it.