play-billing-library-version-upgrade

Migrates Android projects from legacy Google Play Billing Library versions to the latest stable release.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/RavitejaKarra24/dotfiles --skill play-billing-library-version-upgrade-ravitejakarra24
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: play-billing-library-version-upgrade
Source: https://github.com/RavitejaKarra24/dotfiles/tree/main/pi/.pi/agent/skills/play-billing-library-version-upgrade
Command: npx skills add https://github.com/RavitejaKarra24/dotfiles --skill play-billing-library-version-upgrade-ravitejakarra24

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Upgrading the Google Play Billing Library across major versions involves breaking API changes, deprecated classes, and new SDK requirements that are easy to miss, leading to build failures and runtime crashes in production apps. ## Core Features & Use Cases - Effective Version Detection: Scans build files and source code for deprecated APIs (like SkuDetails) to determine the true baseline version, even when the declared dependency version is misleading. - Direct or Stepped Migration Planning: Calculates whether a direct upgrade is safe or plans intermediate version jumps (e.g., v4 → v6 → v8) with per-step build verification. - Version-Specific Checklists: Validates every breaking change between the current and target versions using structured checklists covering SDK requirements, API removals, and signature changes. - Use Case: An Android app still using SkuDetails and manual startConnection() retries needs to reach PBL 9. The skill refactors to ProductDetails, adds enableAutoServiceReconnection(), bumps compileSdk to 35, and verifies with a clean build. ## Quick Start Upgrade my Android project's Play Billing Library to the latest stable version and verify the build passes.

Frequently Asked Questions about play-billing-library-version-upgrade

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upgrade Google Play Billing Library to the latest version?

Update the billing dependency in build.gradle, then refactor deprecated APIs per the migration guides. Key changes include replacing SkuDetails with ProductDetails, using queryPurchasesAsync, and enabling auto service reconnection in the BillingClient builder.

How to migrate from SkuDetails to ProductDetails in Play Billing?

Replace all SkuDetails usage with ProductDetails, which supports multiple offers per product. In PBL 8+, queryProductDetailsAsync returns a QueryProductDetailsResult object instead of a list directly in the listener callback.

What compileSdk version does Play Billing Library 9 require?

Play Billing Library 9.0 requires compileSdk 35 or higher. PBL 7 and 8 require compileSdk 34 or higher, and PBL 8 also raises minSdkVersion to 23.

Should I upgrade Play Billing Library directly or in steps?

If your effective version is within two major versions of the target, a direct migration works. If more than two versions behind, use a stepped migration, upgrading two major versions at a time and verifying each intermediate build.

Why does my billing app crash after upgrading Play Billing Library?

Crashes commonly come from removed APIs like the parameterless enablePendingPurchases() or querySkuDetailsAsync(). You must call enablePendingPurchases with PendingPurchasesParams including enableOneTimeProducts() before building the BillingClient.