Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build on external device #78

Open
albercode10 opened this issue Nov 28, 2022 · 18 comments
Open

Fails to build on external device #78

albercode10 opened this issue Nov 28, 2022 · 18 comments

Comments

@albercode10
Copy link

This only happens when the package is added (ver 2.0.5)

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:checkDebugDuplicateClasses'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class com.google.android.play.core.common.IntentSenderForResultStarter found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-core-common-2.0.2-runtime (com.google.android.play:core-common:2.0.2)
Duplicate class com.google.android.play.core.common.LocalTestingException found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-core-common-2.0.2-runtime (com.google.android.play:core-common:2.0.2)
Duplicate class com.google.android.play.core.common.PlayCoreDialogWrapperActivity found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-core-common-2.0.2-runtime (com.google.android.play:core-common:2.0.2)
Duplicate class com.google.android.play.core.listener.StateUpdatedListener found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-core-common-2.0.2-runtime (com.google.android.play:core-common:2.0.2)
Duplicate class com.google.android.play.core.review.ReviewInfo found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.ReviewManager found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.ReviewManagerFactory found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.testing.FakeReviewManager found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)

 Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

@britannio
Copy link
Owner

This library implements com.google.android.play:review:2.0.1.

Are you using other play libraries such as In-App updates, Play Asset Delivery, Play Feature Delivery etc?

You mentioned building on an external device. Presumably, the issue also occurs if you build an APK or app bundle?

@albercode10
Copy link
Author

albercode10 commented Nov 28, 2022

Im not using any of those libraries that i know of.
it happens when connecting a external phone to Android studio and running the app.

This are my dependencies:
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
cupertino_icons: ^1.0.5
flip_card: ^0.6.0
sqflite: ^2.2.0+3
path_provider: ^2.0.11
intl: ^0.17.0
flutter_bloc: ^8.1.1
equatable: ^2.0.5
share_plus: ^6.2.0
url_launcher: ^6.1.6
shared_preferences: ^2.0.15
sensors_plus: ^2.0.1
devicelocale: ^0.5.5
overlay_support: ^2.0.1
dynamic_color: ^1.5.4
flutter_native_splash: ^2.2.14
flutter_svg: ^1.1.6
auto_size_text: ^3.0.0
store_redirect: ^2.0.1

@jagmohanSB
Copy link

jagmohanSB commented Nov 29, 2022

i am having the same issue is there any solution i am using the in-app update plugin as well
@britannio

@sitaram-gupta
Copy link

Same issue! Conflicting the same modules with firebase_core dependency as named duplicates, waiting for the solution.

@britannio
Copy link
Owner

Im not using any of those libraries that i know of. it happens when connecting a external phone to Android studio and running the app.

This are my dependencies: dependencies: flutter: sdk: flutter flutter_localizations: sdk: flutter cupertino_icons: ^1.0.5 flip_card: ^0.6.0 sqflite: ^2.2.0+3 path_provider: ^2.0.11 intl: ^0.17.0 flutter_bloc: ^8.1.1 equatable: ^2.0.5 share_plus: ^6.2.0 url_launcher: ^6.1.6 shared_preferences: ^2.0.15 sensors_plus: ^2.0.1 devicelocale: ^0.5.5 overlay_support: ^2.0.1 dynamic_color: ^1.5.4 flutter_native_splash: ^2.2.14 flutter_svg: ^1.1.6 auto_size_text: ^3.0.0 store_redirect: ^2.0.1

I was unable to reproduce the issue by adding these packages to the example app then running flutter clean && flutter pub get && flutter build apk

@daksh-pokar-shipsy
Copy link

Yes can verify facing this

`Execution failed for task ':app:checkReleaseDuplicateClasses'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class com.google.android.play.core.common.IntentSenderForResultStarter found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-core-common-2.0.2-runtime (com.google.android.play:core-common:2.0.2)
Duplicate class com.google.android.play.core.common.LocalTestingException found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-core-common-2.0.2-runtime (com.google.android.play:core-common:2.0.2)
Duplicate class com.google.android.play.core.common.PlayCoreDialogWrapperActivity found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-core-common-2.0.2-runtime (com.google.android.play:core-common:2.0.2)
Duplicate class com.google.android.play.core.listener.StateUpdatedListener found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-core-common-2.0.2-runtime (com.google.android.play:core-common:2.0.2)
Duplicate class com.google.android.play.core.review.ReviewException found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.ReviewInfo found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.ReviewManager found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.ReviewManagerFactory found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.model.ReviewErrorCode found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.model.zza found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.testing.FakeReviewManager found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.zza found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.zzb found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.zzc found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.zzd found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.zze found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.zzf found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.zzg found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.zzh found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.zzi found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
`

@britannio
Copy link
Owner

Is there a particular Flutter package this is incompatible with?

@britannio
Copy link
Owner

I'd be curious if anyone is able to break the build of the example app by updating https://github.com/britannio/in_app_review/blob/master/in_app_review/example/pubspec.yaml.

@daksh-pokar-shipsy
Copy link

daksh-pokar-shipsy commented Nov 30, 2022

Will try to check this, up until that I am trying to build by disabling each and every dependency one by one and keeping in_app_review.

Here are my dependencies for reference -

dependencies:
  pdf_render: ^1.3.0
  animated_flip_counter: ^0.2.4
  animations: ^2.0.2
  badges: ^2.0.3
  barcode_scan2: ^4.2.1
  bloc: ^8.0.3
  bloc_concurrency: ^0.2.0
  cached_network_image: ^3.2.0
  connectivity_plus: ^2.3.6
  country_icons: ^2.0.2
  dotted_border: ^2.0.0+2
  easy_localization: ^3.0.0
  flutter:
    sdk: flutter
  flutter_bloc: ^8.0.1
  flutter_local_notifications: ^9.5.3+1
  flutter_localizations:
    sdk: flutter
  flutter_staggered_animations: ^1.0.0
  flutter_svg: ^1.0.3
  fluttertoast: ^8.0.8
  firebase_core: ^1.24.0
  firebase_analytics: ^9.1.0
  firebase_messaging: ^12.0.1
  firebase_crashlytics: ^2.8.2
  file_picker: ^4.4.0
  form_field_validator: ^1.1.0
  geocoding: ^2.0.2
  geolocator: ^8.2.1
  get_it: ^7.2.0
  google_geocoding: ^0.2.0
  google_maps_flutter: ^2.1.10
  image_picker: '0.8.4+9'
  in_app_review: ^2.0.6
  in_app_update: ^3.0.0
  intl: ^0.17.0
  new_version: ^0.3.1
  package_info_plus: ^1.4.0
  pin_code_fields: ^7.4.0
  provider: ^6.0.3
  retry: ^3.1.0
  share_plus: ^4.0.10
  shared_preferences: ^2.0.15
  showcaseview: ^1.1.7
  sliding_up_panel: ^2.0.0+1
  url_launcher: ^6.1.5
  webview_flutter: ^3.0.4

@nikb7
Copy link

nikb7 commented Nov 30, 2022

if you are using in_app_update library, you have to update that as well.
Both libs have updated google play dependencies. If you update 1 lib and not the other that cause the conflict.
We were able to resolve this by updating both the libs.

@nikb7
Copy link

nikb7 commented Nov 30, 2022

@daksh-pokar-shipsy update in_app_update to ^4.0.1

@nikb7
Copy link

nikb7 commented Nov 30, 2022

@britannio maybe you can release this change as major update and change the lib version to 3.0.0. So other don't end up just upgrade this library and running into this error.
Or we can update the documentation for this.

@daksh-pokar-shipsy
Copy link

@nikb7 Will try this, I have to update some other dependencies first to accomplish this.

@nikb7
Copy link

nikb7 commented Nov 30, 2022

You can use version 2.0.4 of in_app_review in the meantime @daksh-pokar-shipsy
This will work with in_app_update: ^3.0.0

@daksh-pokar-shipsy
Copy link

Cool that works, thanks.👍

@sitaram-gupta
Copy link

@nikb7 @daksh-pokar-shipsy Actually, it's hard to match versions of two packages

 firebase_core: ^2.3.0
 firebase_crashlytics: ^3.0.6
 firebase_messaging: ^14.1.2
  with
in_app_review: ^2.0.6
native_updater: ^0.1.1

in_app_review should have mentioned matching versions.

@Simon-PumpAndUp
Copy link

Simon-PumpAndUp commented Dec 14, 2022

Same here:

jetified-core-1.9.1-runtime (com.google.android.play:core:1.9.1) and jetified-core-common-2.0.2-runtime (com.google.android.play:core-common:2.0.2
jetified-core-1.9.1-runtime (com.google.android.play:core:1.9.1) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)

I believe the package is just not well configured regarding the underlying dependencies it uses.

In the meantime, the issue is that you have two or more dependencies using different versions of an underlying dependency.

To resolve this on your side check this answer: https://stackoverflow.com/a/67049254

@yashwp
Copy link

yashwp commented Jan 18, 2023

My build got fixed by updating packages:

in_app_review: ^2.0.6
in_app_update: ^4.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants