Skyost / RateMyApp

This plugin allows to kindly ask users to rate your app if custom conditions are met (eg. install time, number of launches, etc...).
https://pub.dev/packages/rate_my_app
MIT License
265 stars 104 forks source link

Plugin conflict on Android compiles #140

Closed jrmarkham closed 7 months ago

jrmarkham commented 8 months ago

Describe the bug When you upgrade this plugin you get the following gradle errors and failure to compile.

Runs fine on this version. games_services: ^3.0.3

But on this version: games_services: ^4.0.0

You get this error over and over and failure to compile.

Duplicate class com.google.android.gms.games.leaderboard.LeaderboardEntity found in modules jetified-play-services-games-22.0.1-runtime (com.google.android.gms:play-services-games:22.0.1) and jetified-play-services-games-v2-17.0.0-runtime (com.google.android.gms:play-services-games-v2:17.0.0)

and then when it compiles:

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.

* Get more help at https://help.gradle.org

BUILD FAILED in 35s
Running Gradle task 'assembleProdRelease'...                       35.6s
Exception: Gradle task assembleProdRelease failed with exit code 1
#0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1      AndroidGradleBuilder.buildGradleApp (package:flutter_tools/src/android/gradle.dart:512:9)
<asynchronous suspension>
#2      AndroidGradleBuilder.buildApk (package:flutter_tools/src/android/gradle.dart:242:5)
<asynchronous suspension>
#3      AndroidDevice.startApp (package:flutter_tools/src/android/android_device.dart:578:7)
<asynchronous suspension>
#4      FlutterDevice.runCold (package:flutter_tools/src/resident_runner.dart:534:33)
<asynchronous suspension>
#5      ColdRunner.run (package:flutter_tools/src/run_cold.dart:57:28)
<asynchronous suspension>
#6      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:753:27)
<asynchronous suspension>
#7      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1297:27)
<asynchronous suspension>
#8      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#9      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#10     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:339:9)
<asynchronous suspension>
#11     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#12     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:285:5)
<asynchronous suspension>
#13     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:115:9)
<asynchronous suspension>
#14     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#15     main (package:flutter_tools/executable.dart:90:3)
<asynchronous suspension>

There is an override but it cause the app to crash when the app loads the service.

There are other plugins that seem to affect it but this one is the worst. I am guessing (and hoping) you’d just need to update Gradle.

Also, note the upgrade game service is fine if Rate My App is not installed.

To Reproduce Steps to reproduce the behavior: Compile the app for Android

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information): Compiling on Android

Additional context Add any other context about the problem here.

jrmarkham commented 7 months ago

Never mind, I discovered that if I remove the dependency directly from the android/app/build.gradle it is fixed. Odd that it gets exposed with/ your plugin.