I am getting the duplicate entry issue at runtime if I add the intercom library to my gradle.
This is my total app gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.0'
useLibrary 'org.apache.http.legacy'
defaultConfig {
lintOptions {
abortOnError false
disable "ResourceType"
checkReleaseBuilds false
}
ndk {
abiFilters "armeabi", "armeabi-v7a","x86"
}
applicationId "com.sample.activities"
minSdkVersion 19
targetSdkVersion 26
multiDexEnabled true
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
with_ImageProcessor {
}
without_ImageProcessor {
}
}
}
configurations {
}
dependencies {
compile 'com.google.android.gms:play-services-base:11.0.1'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.viewpagerindicator:library:2.4.1#aar'
configurations {
all*.exclude group: 'org.hamcrest', module: 'hamcrest-core'
}
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.android.gms:play-services-gcm:11.0.1'
compile 'com.google.android.gms:play-services-location:11.0.1'
compile 'com.google.firebase:firebase-appindexing:11.0.1'
compile 'com.android.support:design:26.0.1'
compile 'com.android.support:design:26.0.2'
compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.android.support:support-v4:26.0.2'
compile 'com.android.support:support-v13:26.0.2'
//for intercom
compile 'io.intercom.android:intercom-sdk-fcm:4.+'
compile 'com.google.firebase:firebase-auth:11.0.1'
compile 'com.google.android.gms:play-services-auth:11.0.1'
compile 'com.google.firebase:firebase-database:11.0.1'
compile 'com.google.firebase:firebase-messaging:11.0.1'
compile 'com.uncopt:android.justified:1.0'
compile 'com.google.firebase:firebase-invites:11.0.1'
}
apply plugin: 'com.google.gms.google-services'
i am getting this issue afetr adding this line
compile 'io.intercom.android:intercom-sdk-fcm:4.+'
This is the run Time error I am getting
Error:Execution failed for task':waleteros:transformClassesWithJarMergingForWith_ImageProcessorDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzbax.class
Please help me to resolve this issue
Try to add following version of intercom library instead of version you are using :
compile 'io.intercom.android:intercom-sdk-fcm:4.0.0'
OR
compile 'io.intercom.android:intercom-sdk-fcm:4.0.4'
Related
Please help me out. I have been stuck on this problem for so long. I am getting this error when I build my app
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Landroid/arch/lifecycle/LiveData$1;
Here is my app level build.gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "com.exploro.socialmediaapp"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
cppFlags "-std=c++11"
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:27.+'
compile 'com.android.support:recyclerview-v7:27.+'
compile 'com.android.support:design:27.+'
compile 'com.google.firebase:firebase-auth:11.0.4'
compile 'com.android.support:support-v4:27.+'
compile 'com.google.firebase:firebase-database:11.0.4'
compile 'com.theartofdev.edmodo:android-image-cropper:2.6.+'
compile 'com.google.firebase:firebase-storage:11.0.4'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.firebaseui:firebase-ui-database:2.2.0'
compile 'id.zelory:compressor:2.0.0'
compile 'com.squareup.okhttp:okhttp:2.5.0'
compile 'com.google.firebase:firebase-messaging:11.0.4'
compile 'com.github.chrisbanes:PhotoView:2.0.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
Just fix firebase ui version to 3.2.2.
Change
compile 'com.firebaseui:firebase-ui-database:2.2.0'
to
compile 'com.firebaseui:firebase-ui-database:3.2.2'
Here is my build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.example.demo"
minSdkVersion 16
targetSdkVersion 21
multiDexEnabled true
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
aaptOptions
{
cruncherEnabled = false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
repositories {
maven { url "https://jitpack.io" }
}
}
dependencies {
compile project(':draggerLibrary')
compile project(':staggeredGridViewmaster')
compile files('libs/httpclientandroidlib-1.2.1.jar')
compile files('libs/httpcore-4.4-beta1.jar')
compile files('libs/httpmime-4.3.jar')
compile project(':viewPagerLibrary')
compile project(path: ':ViewPagerLibrary')
compile 'com.android.support:multidex:1.0.1'
compile 'joda-time:joda-time:2.4'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.google.android.gms:play-services:11.0.2'
compile 'cn.pedant.sweetalert:library:1.3'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'com.google.guava:guava:20.0'
compile "com.daimajia.swipelayout:library:1.2.0#aar"
compile 'com.github.PhilJay:MPAndroidChart:v2.1.6'
compile 'org.apache.commons:commons-collections4:4.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.volley:volley:1.0.0'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
}
Error:Execution failed for task
':DemoProject:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry:
android/support/v4/provider/DocumentsContractApi19.class
Configure your build.gradle .
Use
compileSdkVersion 25
buildToolsVersion "25.0.2"
Then
compile 'com.google.android.gms:play-services:11.0.2'
compile 'com.android.support:appcompat-v7:25.3.1'
For your MAP problem use getMapAsync()
SupportMapFragment mapOBJ = ((SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map));
mapOBJ.getMapAsync(this);
Read Replace getMap with getMapAsync
this is my project build.gradle file .whenever i run the project in android studio i get the duplicate entry: android/support/v4/util/MapCollections$ArrayIterator.class error
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "com.aitsolution.bizitapp.bizit"
minSdkVersion 16
targetSdkVersion 23
versionCode 14
versionName "1.13"
multiDexEnabled = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
dexOptions {
javaMaxHeapSize "3g"
}
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
dependencies {
// compile fileTree(include: ['*.jar'], dir: 'libs')
// testCompile 'junit:junit:4.12'
compile files('libs/linkedin-j-android.jar')
compile files('libs/MobileOcrEngine.jar')
compile files('libs/signpost-core-1.2.1.1.jar')
compile files('libs/twitter4j-core-3.0.5.jar')
compile files('libs/ksoap2_2.6.0.jar')
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.facebook.android:facebook-android-sdk:4.6.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:recyclerview-v7:+'
compile 'com.google.android.gms:play-services:9.0.0'
compile 'com.google.android.gms:play-services-appindexing:9.0.0'
compile 'com.android.support:cardview-v7:23.3.+'
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'com.google.code.gson:gson:2.4'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.edmodo:cropper:1.0.1'
}
I think facebook sdk comes with v4-support library exclude that and try.
compile ('com.facebook.android:facebook-android-sdk:4.6.0') {
exclude module: 'support-v4'
}
I get and error when I try to Sync project with Gradles files
Here is the error
Error:Execution failed for task ':app:processDebugGoogleServices'.
No matching client found for package name 'ua.com.qascript.android'
And here is the Gradle file content:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.0"
packagingOptions {
exclude('META-INF/NOTICE')
}
packagingOptions {
exclude('META-INF/LICENSE')
}
defaultConfig {
applicationId "ua.com.qascript.android"
minSdkVersion 14
targetSdkVersion 22
versionName '1.7'
versionCode 11
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
}
}
productFlavors {
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/volley.jar')
compile('org.apache.httpcomponents:httpmime:4.3.6') {
exclude module: 'httpclient'
}
compile 'org.apache.httpcomponents:httpclient-android:4.3.5'
compile 'com.github.chrisbanes.photoview:library:1.2.3'
compile 'com.google.android.gms:play-services:9.4.0'
compile 'com.facebook.android:facebook-android-sdk:4.0.1'
compile 'com.android.support:support-v4:24.2.1'
compile 'com.google.android.gms:play-services-gcm:9.4.0'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:cardview-v7:24.1.1'
compile 'com.android.support:recyclerview-v7:24.1.1'
compile 'com.google.android.gms:play-services-ads:9.4.0'
compile 'com.pkmmte.view:circularimageview:1.1'
compile 'com.android.support:design:24.2.1'
compile 'com.melnykov:floatingactionbutton:1.3.0'
}
// Add to the bottom of the file
apply plugin: 'com.google.gms.google-services'
Well, this error appear after I update the Google Play Services to can add Firebase Cloud Messages, it request minimum vers 9.0.
Please help me to fix it. Thanks.
I am attempting to integrate Pushy (https://pushy.me/) into my app to allow for more reliable real-time notifications, in place of GCM.
However, upon attempting to run the app, the error below appears:
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/fasterxml/jackson/core/base/GeneratorBase$1.class
Below is my build.gradle class:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "22.0.1" // 22.0.1
defaultConfig {
applicationId "com.example.android.myapp2"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
}
dataBinding {
enabled = true
}
}
dependencies {
compile 'com.android.support:design:23.1.0'
compile 'com.mcxiaoke.volley:library:1.0.+'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.code.gson:gson:2.6.1'
compile 'com.firebase:firebase-client-android:2.5.1+'
compile 'com.google.android.gms:play-services-gcm:8.3.0'
compile 'com.android.support:support-v4:23.1.0'
compile 'com.android.support:recyclerview-v7:23.1.0'
compile fileTree(dir: 'libs', include: ['*.jar'])
}
I have attempted to clean, rebuild, but nothing helps.
How can I alleviate this issue?
After contacting the support line, I simply needed to prevent duplicate references of the jackson library:
configurations {
all*.exclude group: 'com.fasterxml.jackson.core'
}
and changed the dependencies to:
dependencies {
compile 'com.android.support:design:23.1.0'
compile 'com.mcxiaoke.volley:library:1.0.+'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.code.gson:gson:2.6.1'
compile 'com.firebase:firebase-client-android:2.5.1+'
compile 'com.google.android.gms:play-services-gcm:8.3.0'
compile 'com.android.support:support-v4:23.1.0'
compile 'com.android.support:recyclerview-v7:23.1.0'
compile files('libs/pushy-1.0.7.jar') //** Specified **
}