0

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.

Vaibhav More
  • 994
  • 3
  • 10
  • 22
  • `multiDexEnabled true` in the Gradle config doesn't enable multidex on its own – OneCricketeer Jan 09 '17 at 05:10
  • What should I do than... should I add permission in manifest file – Vaibhav More Jan 09 '17 at 05:56
  • You should start over after reading some documentation. Your dependencies are outdated. https://github.com/firebase/FirebaseUI-Android/blob/master/README.md and https://developers.google.com/android/guides/setup Note: only compile the play services you **need**, not all of them. See the link for details – OneCricketeer Jan 09 '17 at 13:38

0 Answers0