Question

purchases_flutter: ^5.0.0 migration

  • 15 June 2023
  • 5 replies
  • 198 views

Badge +2

Hey all,

I’m getting the notice by Google to update my billing library or else.

I saw v5.0 of the flutter library was published and just did a quick test by changing the version of purchases_flutter to 5.0.0 on pubspec.yaml and see what happened, and to no one’s surprise, the code didn’t compile. I’m pretty noob with RevenueCat so I don’t really know where to start with this and the migration guide doesn’t help me.

Anyone has any tips on what to look for on my code that needs to be updated so that whatever works on v4 keeps working on v5 of purchases_flutter?

 

Thanks a lot


5 replies

Badge +2

It would help if you paste the error message you’re getting :)

Badge +1

Hey I believe I’m running into a similar error to you, after updating my purchases_flutter to 5.0.0 - heres what happens when I run “flutter run -v”

 

[  +96 ms] FAILURE: Build failed with an exception.
[   +1 ms] * What went wrong:
[        ] Execution failed for task ':purchases_flutter:processDebugManifest'.
[        ] > Failed to calculate the value of task ':purchases_flutter:processDebugManifest' property 'packageOverride'.
[        ]    > Failed to query the value of property 'applicationId'.
[        ]       > Package Name not found in /Users/<placeholder_folder_name>/.pub-cache/hosted/pub.dev/purchases_flutter-5.0.0/android/src/main/AndroidManifest.xml

Does anyone have any idea on how I can resolve this? Thanks!

Badge +2

It would help if you paste the error message you’re getting :)

Fair enough 😂

I'll try again next week and report back with the logs (this is not my main gig). In the meantime if someone has migrated and has some quick and dirty reference like "I replaced all price.xxx with price.xxx.yyy" that helps too.

Thanks a lot

Userlevel 3
Badge +3

Thank you for updating to the latest version of purchases_flutter @BcRew 

There are some migration steps in the GitHub release https://github.com/RevenueCat/purchases-flutter/releases/tag/5.0.0 and also in our docs https://www.revenuecat.com/docs/android-native-5x-to-6x-migration

 

I hope that helps!

Badge +1

An update to my recent reply above, which might be related to your issue of not compiling when upgrading to 5.0.0. Once I upgraded Gradle the issue went away. I updated the files below: Good luck all!

android/build.gradle:

  • classpath "com.android.tools.build:gradle:7.0.1"

android/gradle/wrapper/gradle-wrapper.properties:

  • distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip

Reply