i am using react-native-billing library with version 3.0.0. I am facing an issue i.e, when we roll out the APK for production, after upload we are getting this error message :
"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"
PROBLEM:- I have manually added the following line in
android/app/build.gradle ->implementation project(':react-native-billing')
android/build.gradle -> minSdkVersion = 16,compileSdkVersion = 28,targetSdkVersion = 30
with these following details, the application is working fine but google refuses to upload our build with this 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"
SOLUTION WE TRIED:- added the following line in android/app/build.gradle implementation "com.android.billingclient:billing:3.0.0"
using Android API 30
With these changes, the build was successfully uploaded but we are not getting a product list from "In-app products".
And after adding this line in debugging mode the application was crashing on this line.
InAppBilling.open();
We are importing InAppBilling from the "react-native-billing" library.
Any help will be highly appreciated.
Ran into the same issue - it looks like the plugin react-native-billing was built off of another plugin (https://github.com/anjlab/android-inapp-billing-v3) when Billing Library version 2 was the standard. Plugin android-inapp-billing-v3 has since updated to Billing Library 3 but react-native-billing has not implemented the required changes to match up. I've been able to force react-native-billing to pull the newer version of android-inapp-billing-v3 and am attempting to update the plugin manually (so far unsuccessfully) but if better heads want to give it a crack:
in
~\node_modules\react-native-billing\android\build.gradle
update:
dependencies {
...
implementation "com.anjlab.android.iab.v3:library:${safeExtGet('anjlabIABVersion', '2.0.3')}"
}
then follow this migration guide:
https://github.com/anjlab/android-inapp-billing-v3/blob/master/UPGRADING.md