Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uploading Flutter App to Google Play - Please upgrade to Billing Library version 3 or newer to publish this app. Learn More about Billing Library 3

When uploading a flutter App to Google Play, I get the following error:

We've detected this app uses an unsupported version of Play billing. Please upgrade to Billing Library version 3 or newer to publish this app. Learn More about Billing Library 3.

I have updated the app/build.gradle dependencies with this:

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    def billing_version = "4.0.0"
    implementation "com.android.billingclient:billing-ktx:$billing_version"
  
}

I am using purchases_flutter plugin:

purchases_flutter: ^3.4.5

I have also run flutter clean multiple times.

Here is my flutter doctor output:

[✓] Flutter (Channel stable, 2.2.3, on macOS 11.2.3 20D91 darwin-x64, locale en-US)
• Flutter version 2.2.3 at /Users/jabari.garrett/Development/Tools/flutter
• Framework revision f4abaa0735 (3 months ago), 2021-07-01 12:46:11 -0700
• Engine revision 241c87ad80
• Dart version 2.13.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/jabari.garrett/Library/Android/sdk
• Platform android-31, build-tools 30.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.5, Build version 12E262
• CocoaPods version 1.11.2

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
  🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
  🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.60.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.26.0

[✓] Connected device (2 available)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
• Chrome (web)                       • chrome        • web-javascript • Google Chrome 93.0.4577.82

I can't create any Subscription because of this.

Any help is appreciated!

like image 478
braveheart1996 Avatar asked Sep 24 '21 19:09

braveheart1996


People also ask

Why publish your Flutter App to Google Play and Apple App Stores?

Publishing your Flutter app to Google Play and Apple App Stores. A few lessons I learnt the hard way! The real magic in Flutter is the ease in which it can create multiple production-ready binaries from a single code base.

How do I test an app using flutter?

During a typical development cycle, you test an app using flutter run at the command line, or by using the Run and Debug options in your IDE. By default, Flutter builds a debug version of your app. When you’re ready to prepare a release version of your app, for example to publish to the Google Play Store , this page can help.

What is flutter and why should I use it?

Flutter is a Google's UI kit, made for cross-platforms, meaning that with just one set of codes, it can be used to run in Android, iOS, and Web. Pretty neat, right? Anyways, I've been hitting my keyboard here and there, and was lucky enough to create two simple apps and deploy it on both Play Store and App Store.

How does Google Play billing library support multi-quantity purchases?

Supported in versions 4.0 and higher of the Google Play Billing Library, Google Play allows customers to purchase more than one of the same in-app product in one transaction by specifying a quantity from the purchase cart. Your app is expected to handle multi-quantity purchases and grant entitlement based on the specified purchase quantity.


1 Answers

Add this dependency in your app/build.gradle file

implementation 'com.android.billingclient:billing:3.0.0'

This works for me.

like image 65
Vishal Agrawal Avatar answered Oct 17 '22 15:10

Vishal Agrawal