Skip to main content

I have integrated RevenueCat into my Unity project version 2021.1.17. It worked fine on iOS but I can’t get it to work on Android. At first, I tried installing it alongside Unity IAP but it did not work. Then I tried removing Unity IAP but still cannot get RevenueCat to work. After launching my app, I get the following series of errors that show up on Android Logcat:

 

First, this error from UnityAds (I need RevenueCat and UnityAds to work together):

 

Error UnityAds com.unity3d.services.store.StoreBilling.asInterface() (line:7) :: Billing service stub not found: com.android.vending.billing.IInAppBillingService$Stub: Didn't find class "com.android.vending.billing.IInAppBillingService$Stub" on path: DexPathListexzip file...

 

Next, this error from RevenueCat:

 

Error Purchases {"purchaserInfo":{"entitlements":{"all":{},"active":{}},"activeSubscriptions":b],"allPurchasedProductIdentifiers":I]…


Finally, when I try to purchase something, this error from RevenueCat:

 

Error Purchases {"error":{"code":5,"message":"The product is not available for purchase.","readableErrorCode":"ProductNotAvailableForPurchaseError","readable_error_code":"ProductNotAvailableForPurchaseError","underlyingErrorMessage":"Couldn't find product."}}

 

What do I need to do to make this work? (This project was already working using Unity IAP and is live on the Google Play Store with working in app purchases - I am just trying to migrate over to RevenueCat). Everything worked before with just Unity IAP.

Hi @Jaime,

Which version of the RevenueCat Unity plugin are you using and what version of Unity IAP are you using? We have some caveats mentioned in our docs on setting these up side-by-side - have you tried going through these? https://docs.revenuecat.com/docs/unity#installation-with-unity-iap-side-by-side

Another thing you could try is to try clearing your gradle cache, sometimes that helps with dependency issues.

The first error you mentioned from RevenueCat doesn’t look like a real error, it looks like it’s just logging your PurchaserInfo. For your second error, can you double check the product identifier in both RevenueCat and your Google Play Console? Many times, the `ProductNotAvailableForPurchaseError` indicates the user attempting to make the purchase doesn't have access to that product - can you confirm you're using a test account for purchases? See our docs for reference: https://docs.revenuecat.com/docs/google-play-store 


So I was able to fix the issue. I found in another post, that there is an optional variable that needs to be set when calling PurchaseProduct, and that I needed to set the optional type to “inapp”. I will follow up separately with support to suggest improvements to the API. This variable should not be optional, and should be an enum instead of a magic string.


Reply