Closed Azaratur closed 4 years ago
Temporally fixed by adding:
{
exclude group: 'com.parse.bolts', module: 'bolts-tasks';
}
and forking ParseLiveQuery, those are "pointing" to older ParseSDK
Thanks for the bug report -- https://github.com/parse-community/ParseLiveQuery-Android/pull/107
i have the same erro error :Program type already present: bolts.AndroidExecutors
Libs: implementation 'com.github.parse-community.Parse-SDK-Android:parse:1.24.1' implementation "com.github.parse-community.Parse-SDK-Android:fcm:1.24.1" implementation 'com.github.parse-community.Parse-SDK-Android:facebook:1.24.1' implementation 'com.github.parse-community:ParseLiveQuery-Android:1.2.0'
i try --> exclude group: 'com.parse.bolts', module: 'bolts-tasks'; but not solved my problem
Yes i still that issue too, but i did solve it whit this: implementation ("com.github.parse-community.Parse-SDK-Android:parse:1.24.1") { exclude group: 'com.parse.bolts', module: 'bolts-tasks'; } implementation ("com.github.parse-community.Parse-SDK-Android:facebook:1.24.1") { exclude group: 'com.parse.bolts', module: 'bolts-tasks'; } implementation ("com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1") { exclude group: 'com.parse.bolts', module: 'bolts-tasks'; } implementation ('com.github.parse-community:ParseLiveQuery-Android:1.2.0') { exclude group: 'com.parse.bolts', module: 'bolts-tasks'; }
not solved to me :(
get the same error:
AGPBI: {"kind":"error","text":"Program type already present: bolts.AggregateException","sources":[{}],"tool":"D8"}
Can you list out all your dependencies and version numbers?
implementation 'org.slf4j:slf4j-nop:1.5.8'
implementation 'com.github.JakeWharton:ViewPagerIndicator:2.4.1'
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.google.android.libraries.places:places:2.1.0'
implementation 'org.apache.commons:commons-lang3:3.4'
implementation 'com.snappydb:snappydb-lib:0.5.2'
implementation 'com.esotericsoftware.kryo:kryo:2.24.0'
implementation 'com.google.maps.android:android-maps-utils:0.5'
implementation('com.digits.sdk.android:digits:2.0.5@aar') {
transitive = true
}
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'commons-net:commons-net:3.5'
implementation 'com.elyeproj.libraries:loaderviewlibrary:1.5.0'
implementation('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
transitive = true
}
**//Parse**
implementation("com.github.parse-community.Parse-SDK-Android:parse:1.24.1") {
exclude group: 'com.parse.bolts', module: 'bolts-tasks';
}
implementation("com.github.parse-community.Parse-SDK-Android:facebook:1.24.1") {
exclude group: 'com.parse.bolts', module: 'bolts-tasks';
}
implementation("com.github.parse-community.Parse-SDK-Android:fcm:1.24.1") {
exclude group: 'com.parse.bolts', module: 'bolts-tasks';
}
implementation("com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1") {
exclude group: 'com.parse.bolts', module: 'bolts-tasks';
}
implementation('com.github.parse-community:ParseLiveQuery-Android:1.2.0') {
exclude group: 'com.parse.bolts', module: 'bolts-tasks';
}
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.squareup.okhttp:okhttp:2.4.0'
implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.annotation:annotation:1.1.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
implementation 'com.facebook.android:facebook-android-sdk:5.8.0'
implementation 'androidx.room:room-runtime:2.2.3'
annotationProcessor 'androidx.room:room-compiler:2.2.3'
implementation 'com.madgag.spongycastle:pkix:1.51.0.0'
implementation 'me.zhanghai.android.materialratingbar:library:1.3.2'
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.sothree.slidinguppanel:library:3.4.0'
//implementation 'com.facebook.android:account-kit-sdk:4.39.0'
implementation 'com.googlecode.libphonenumber:libphonenumber:8.10.9'
implementation 'com.sothree.slidinguppanel:library:3.4.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.1'
implementation 'com.squareup.okhttp3:okhttp:3.12.1'
implementation 'com.airbnb.android:lottie:3.3.1'
implementation 'com.github.mayuce:LottieAlertDialog:1.1'
implementation "androidx.core:core-ktx:1.1.0"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.1.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "androidx.viewpager2:viewpager2:1.0.0"
implementation "com.google.android.material:material:1.1.0"
implementation 'androidx.navigation:navigation-fragment-ktx:2.2.0'
implementation 'androidx.navigation:navigation-ui-ktx:2.2.0'
implementation 'io.fotoapparat:fotoapparat:2.7.0'
implementation 'com.flurry.android:analytics:11.4.0@aar'
If you remove live-query, does it work?
not,the error continue
Pc-cesar can you paste the error message? It should indicate which library import bolt and which one is in conflict.
This is the error I get:
Duplicate class bolts.AggregateException found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.AndroidExecutors found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.AndroidExecutors$1 found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.AndroidExecutors$UIThreadExecutor found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.BoltsExecutors found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.BoltsExecutors$1 found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.BoltsExecutors$ImmediateExecutor found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.CancellationToken found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.CancellationTokenRegistration found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.CancellationTokenSource found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.CancellationTokenSource$1 found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.Capture found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.Continuation found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.ExecutorException found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.Task found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.Task$1 found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.Task$10 found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.Task$11 found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.Task$12 found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.Task$13 found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.Task$14 found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.Task$15 found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.Task$15$1 found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.Task$2 found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.Task$3 found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.Task$4 found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.Task$5 found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.Task$6 found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.Task$7 found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.Task$8 found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.Task$9 found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.Task$TaskCompletionSource found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.Task$UnobservedExceptionHandler found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.TaskCompletionSource found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.UnobservedErrorNotifier found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
Duplicate class bolts.UnobservedTaskException found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)
The bolts-tasks
module has been added natively to this library in https://github.com/parse-community/Parse-SDK-Android/pull/1018 without changing its name.
This creates a bolts-tasks
module with version of the Parse Android SDK:
com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1
The original Bolts framework is still being used by the Facebook Android SDK which is transitively added by the Parse Android SDK and/or as a regular project dependency.
+--- com.github.parse-community.Parse-SDK-Android:facebook:1.24.1
| \--- com.facebook.android:facebook-login:6.3.0 -> 7.0.1
| +--- com.facebook.android:facebook-core:7.0.1
| | +--- com.parse.bolts:bolts-android:1.4.0
| | | +--- com.parse.bolts:bolts-tasks:1.4.0
| | | \--- com.parse.bolts:bolts-applinks:1.4.0
| | | \--- com.parse.bolts:bolts-tasks:1.4.0
+--- com.facebook.android:facebook-android-sdk:7.0.1
| +--- com.facebook.android:facebook-applinks:7.0.1
| | +--- com.parse.bolts:bolts-android:1.4.0 (*)
| +--- com.facebook.android:facebook-messenger:7.0.1
| | +--- com.facebook.android:facebook-core:7.0.1 (*)
| | \--- com.parse.bolts:bolts-android:1.4.0 (*)
The result is the same bolts-tasks
module with different versions and duplicate classes.
com.parse.bolts:bolts-tasks:1.4.0
Note: The underlying issue seems to be that the Bolts framework and the Parse Platform share the same package domain com.parse
. Now we have a legacy module that is not managed by Parse Platform sharing the same domain space. So another solution would be to change the domain from com.parse
to something like com.parseplatform
or com.parsecommunity
for the open source project.
@rogerhu @Jawnnypoo
1.24.0
.Adding a test case would be very difficult since it involves including the Facebook SDK too and is a compilation issue, not a code issue.
The release is broken for those who use the Facebook SDK + Parse-SDK, not everyone. Totally agree with having more maintainers though, this is a huge SDK with lots of nuance to it, so the more maintainers, the better.
The release is broken for those who use the Facebook SDK + Parse-SDK
It's broken also for those who use the Parse SDK's own facebook module because of transitivity. So we don't need to include the FB SDK separately.
+--- com.github.parse-community.Parse-SDK-Android:facebook:1.24.1
| \--- com.facebook.android:facebook-login:6.3.0 -> 7.0.1
| +--- com.facebook.android:facebook-core:7.0.1
| | +--- com.parse.bolts:bolts-android:1.4.0
| | | +--- com.parse.bolts:bolts-tasks:1.4.0
| | | \--- com.parse.bolts:bolts-applinks:1.4.0
| | | \--- com.parse.bolts:bolts-tasks:1.4.0
True. I released 1.24.2 with this fix.
Thanks a lottt!! Sorry for not answer your question!!!
Obviously this repo needs maintainers, because the issues are piling up here and we have a broken release for months. How about pinning a call for additional maintainers to this repo?
I've added a pinned issue asking for maintainers - hopefully it looks ok!
Great, it looks perfect!
It's quite unfortunate that the Bolts is not an external package. We're using Bolts in different modules in our app, and they cannot interoperate if we upgrade the SDK. Consider extracting the bolts package.
This is my setting: implementation "com.github.parse-community.Parse-SDK-Android:parse:1.24.1" implementation "com.github.parse-community.Parse-SDK-Android:facebook:1.24.1" implementation 'com.github.parse-community:ParseLiveQuery-Android:1.1.0'
And this is what i got: Duplicate class bolts.Capture found in modules jetified-bolts-tasks-1.24.1.jar (com.github.parse-community.Parse-SDK-Android:bolts-tasks:1.24.1) and jetified-bolts-tasks-1.4.0.jar (com.parse.bolts:bolts-tasks:1.4.0)