Android: no products and purchases do nothing (“Purchases are disabled”)
If an Android app shows no products and purchase taps do nothing, check logcat for BillDog: Purchases are disabled. It means the SDK couldn't load its Play Billing manager, nearly always because io.billdog:billdog-paywall or the Play Billing library isn't in the build. Add the missing dependency and rebuild. You don't need a ProGuard keep rule.
Symptom
- The paywall renders but shows no products, or product placeholders never fill in.
- Tapping a purchase button does nothing.
- The app doesn't crash.
- Logcat shows a warning from the
BillDogtag:
W BillDog: Purchases are disabled: io.billdog.managers.PlayBillingPurchaseManager is not on the classpath (ClassNotFoundException). Add io.billdog:billdog-paywall to enable Play Billing.
The wording after Purchases are disabled: says which piece is missing: the manager class, “a class … needs”, or “the Play Billing library”.
Why it happens
BillDog looks up its Play Billing manager by class name instead of linking it at compile time. That way, apps that don't sell through Google Play (the engagement-only SDK) never have to ship the Play Billing library.
When the lookup fails, the SDK falls back to a purchase manager that returns no products and can't sell, and it logs the warning above instead of crashing at configure(). The lookup fails when:
| Cause | How to tell |
|---|---|
billdog-paywall isn't a dependency (only billdog-core or the engagement SDK is linked) |
The log line names PlayBillingPurchaseManager is not on the classpath |
| The Play Billing library is missing or excluded from the build | The log line says the Play Billing library is not on the classpath |
| A dependency rule removes either one from a single build variant | Works in one variant (often debug) and not the other |
R8 stripping the class is not the usual cause: billdog-core ships -keep class io.billdog.** { *; } as a consumer rule, and R8 applies consumer rules to your app automatically.
Confirm it
- Run the app and filter logcat by the
BillDogtag. If you seePurchases are disabled, this is the cause, and the rest of the line says which piece is missing. - List what the failing variant actually packages:
./gradlew :app:dependencies --configuration releaseRuntimeClasspath | grep -E "billdog-paywall|billingclient"
Use debugRuntimeClasspath for a debug build. If io.billdog:billdog-paywall or com.android.billingclient:billing is missing, you've found it.
Fix
- Add the paywall module next to core, on the same version:
dependencies {
implementation("io.billdog:billdog-core:<version>")
implementation("io.billdog:billdog-paywall:<version>")
}
- Remove any
excluderule or variant-specific configuration (debugImplementationonly, for example) that dropsbilldog-paywallorcom.android.billingclient:billing. - Rebuild the variant that failed, install it, and confirm products load and one purchase completes.
React Native, Expo and Flutter apps get these modules through the BillDog package. If you see the warning there, reinstall the package and rebuild the native project rather than adding Gradle lines by hand.
Stop it coming back
- Complete one real purchase in a release build before every store submission. “The paywall rendered” isn't enough.
- Treat
Purchases are disabledin logcat as a release blocker. Add a check to your QA script that fails the run when it appears. - Upgrade
billdog-coreandbilldog-paywalltogether. Mismatched versions fail differently (a crash naming the constructor), but they come from the same habit.
If you use BillDog
This page is about BillDog's own behaviour. The fallback, the log line and the bundled keep rule were checked against the published Android SDK 1.1.1-beta.5. It hasn't yet been reproduced on a device for this page.
An earlier version of this page, at /docs/known-store-issues/android-minification, said R8 strips the class and that you should add a keep rule. That isn't what the current SDK does.
Related
Sources
Did this fix it?
Frequently asked questions
Do I need to add a ProGuard or R8 keep rule for BillDog?
No. billdog-core ships its own consumer rule, -keep class io.billdog.** { *; }, which R8 applies to your app automatically. Look for a missing dependency first.
Why doesn't the app crash when Play Billing is missing?
Play Billing is optional in BillDog: apps that only use the engagement SDK don't ship it. When the Play Billing manager can't be loaded, the SDK logs a warning and turns purchases off instead of crashing at configure().
What if the app crashes with 'no (Context, ApiClient, BillDogConfig) constructor'?
That is a different problem: billdog-core and billdog-paywall are different versions. Put both on the same version.