Skip to main content
Solved

purchases_flutter uses or overrides a deprecated API


Forum|alt.badge.img+4

I am trying RevenueCat for the first time. When I compile my project in VS Code since including the purchases_flutter package (latest version: purchases_flutter: ^6.0.0), I receive this warning:

Note: C:\Users\User\AppData\Local\Pub\Cache\hosted\pub.dev\purchases_flutter-6.0.0\android\src\main\java\com\revenuecat\purchases_flutter\PurchasesFlutterPlugin.java uses or overrides a deprecated API.

minSdkVersion is set to 30 (flutter.minSdkVersion=30)

Flutter Doctor info:
[√] Flutter (Channel stable, 3.13.7, on Microsoft Windows [Version 10.0.19045.3570], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[!] Visual Studio - develop Windows apps (Visual Studio Community 2017 15.8.1)  
    X Visual Studio 2019 or later is required.
[√] Android Studio (version 2022.3)
[√] VS Code (version 1.83.1)
 

How do I fix this problem?

Thank you.

Best answer by kaitlin

Hey @Talicom,

Thank you for bringing this to our attention! In Billing Client 6, `GoogleProrationMode` is deprecated, but there was one missed reference to it. This has since been fixed, and will be included in the next release of the Flutter SDK, which you can keep an eye out for here: https://github.com/RevenueCat/purchases-flutter/releases

In the meantime, you should be safe to test while ignoring this warning, unless you are testing proration modes or DEFERRED replacement mode, in which you can just follow the instructions here: https://github.com/RevenueCat/purchases-flutter/releases/tag/6.0.0

View original
Did this post help you find an answer to your question?
This post has been closed for comments

2 replies

Forum|alt.badge.img+4
  • Author
  • Active Member
  • 11 replies
  • October 19, 2023

Can someone please answer this question?

This is the more detailed message after compiling with -Xlint:deprecation:

C:\Users\User\AppData\Local\Pub\Cache\hosted\pub.dev\purchases_flutter-6.0.0\android\src\main\java\com\revenuecat\purchases_flutter\PurchasesFlutterPlugin.java:24: warning: [deprecation] GoogleProrationMode in com.revenuecat.purchases.models has been deprecated

import com.revenuecat.purchases.models.GoogleProrationMode;


kaitlin
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 390 replies
  • Answer
  • November 2, 2023

Hey @Talicom,

Thank you for bringing this to our attention! In Billing Client 6, `GoogleProrationMode` is deprecated, but there was one missed reference to it. This has since been fixed, and will be included in the next release of the Flutter SDK, which you can keep an eye out for here: https://github.com/RevenueCat/purchases-flutter/releases

In the meantime, you should be safe to test while ignoring this warning, unless you are testing proration modes or DEFERRED replacement mode, in which you can just follow the instructions here: https://github.com/RevenueCat/purchases-flutter/releases/tag/6.0.0


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings