qiscus / qiscus-sdk-android

Qiscus provide everything you need to power up your app with chats. And it's now made simple.
https://www.qiscus.com
Apache License 2.0
201 stars 84 forks source link

Error: Program type already present: android.arch.lifecycle.ViewModelStore #81

Closed MoinHashmi closed 5 years ago

MoinHashmi commented 5 years ago

I am getting this error after including qiscus in me existing project. I thought it was conflict of glide so I tried to exclude glide by using: implementation ('com.qiscus.sdk:chat-core:1.2.12'){ exclude group: 'com.github.bumptech.glide', module: 'glide' }

but still I am getting same error my current dependecies are as follow:

implementation fileTree(include: ['*.jar'], dir: 'libs') //Chat dependencies implementation ('com.qiscus.sdk:chat-core:1.2.12'){ exclude group: 'com.github.bumptech.glide', module: 'glide' } //noinspection GradleCompatible implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support:support-v4:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' implementation 'com.android.support:design:28.0.0' implementation 'com.android.support:cardview-v7:28.0.0' implementation 'com.google.android.gms:play-services-maps:15.0.1' implementation 'com.google.android.gms:play-services-places:15.0.1' implementation 'fr.avianey.com.viewpagerindicator:library:2.4.1.1@aar' //noinspection GradleCompatible implementation 'com.google.firebase:firebase-auth:16.0.5' implementation 'com.google.android.gms:play-services-auth:16.0.1' implementation 'com.google.firebase:firebase-database:16.0.4' implementation 'com.google.firebase:firebase-core:16.0.5' implementation 'com.google.firebase:firebase-storage:16.0.4' implementation 'com.firebaseui:firebase-ui-database:3.1.1' implementation 'com.google.firebase:firebase-messaging:17.3.4' implementation 'com.google.firebase:firebase-dynamic-links:16.1.3' implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5' implementation 'com.android.support:support-annotations:27.1.1' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' implementation 'com.jakewharton:butterknife:8.8.1' annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' implementation 'com.android.support:recyclerview-v7:28.0.0' implementation 'com.github.bumptech.glide:glide:4.8.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'

implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.jsibbold:zoomage:1.1.0-SNAPSHOT'
implementation 'com.facebook.android:facebook-login:4.34.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'com.firebase:geofire-android:2.3.1'
implementation 'com.github.greenfrvr:hashtag-view:1.3.1'
implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0'
implementation 'me.saket:better-link-movement-method:2.2.0'
implementation 'org.ocpsoft.prettytime:prettytime:4.0.1.Final'
implementation 'com.squareup.okhttp:okhttp:2.6.0'
implementation 'com.squareup.retrofit:retrofit:1.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.3.1'
implementation 'com.squareup.okhttp3:okhttp:3.8.1'
implementation 'com.jakewharton.retrofit:retrofit1-okhttp3-client:1.0.2'

implementation 'id.zelory:compressor:2.1.0'
implementation 'joda-time:joda-time:2.10.1'

implementation('com.google.api-client:google-api-client-android:1.20.0') {
    exclude module: 'guava-jdk5'
}

can you please give me any solution for this issue?

adicatur commented 5 years ago

Hi @MoinHashmi, in our SDK this version com.qiscus.sdk:chat-core:1.2.12 did not use glide. Can we know what's error message?

MoinHashmi commented 5 years ago

this was the error "Error: Program type already present: android.arch.lifecycle.ViewModelStore" in details it was mentioning the android documentation link for duplicate dependencies... But it is resolved my adding these two dependencies in my project: implementation "android.arch.lifecycle:extensions:1.1.1" annotationProcessor "android.arch.lifecycle:compiler:1.1.1"

adicatur commented 5 years ago

Ok, then it's the implementation, it's not part of SDK. Anyway thanks for the report