play-billing-library-version-upgrade

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

2|Updated Jun 21, 2026
One-click install
npx skills add https://github.com/IsKenKenYa/skills --skill play-billing-library-version-upgrade-iskenkenya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: play-billing-library-version-upgrade
Source: https://github.com/IsKenKenYa/skills/tree/main/skills/android/play/play-billing-library-version-upgrade
Command: npx skills add https://github.com/IsKenKenYa/skills --skill play-billing-library-version-upgrade-iskenkenya

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. ## Core Features & Use Cases - Effective Version Detection: Scans build files and source code for deprecated APIs (like SkuDetails) to determine the true baseline version, then plans a direct or stepped migration path. - Intent-Based Refactoring: Replaces legacy patterns with modern equivalents, such as swapping SkuDetails for ProductDetails, adding enableAutoServiceReconnection(), and migrating ProrationMode to ReplacementMode. - Version-Specific Verification: Applies a smart checklist covering every requirement between the current and target versions, then validates with unit tests and clean Gradle builds. - Use Case: An app still on PBL v5 needs to reach v9; the skill plans a stepped migration (v5 to v7 to v9), refactors the billing code at each stage, and verifies each intermediate build compiles. ## Quick Start Help me upgrade my Play Billing Library implementation to the latest version.

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 or libs.versions.toml, then refactor deprecated APIs per the official migration guides. This skill detects your effective version, plans a direct or stepped path, refactors the code, and verifies with Gradle builds.

How to migrate from SkuDetails to ProductDetails in Play Billing?

Replace all SkuDetails usages with ProductDetails, which supports multiple subscription offers per product. In PBL 8+, queryProductDetailsAsync returns a QueryProductDetailsResult object instead of a list 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.

When is a stepped migration needed for Play Billing Library upgrades?

A stepped migration is needed when your effective version is more than two major versions behind the target. You migrate two major versions at a time, verifying each intermediate build with ./gradlew assembleDebug before continuing.

Why does my billing code break after upgrading to PBL 8?

PBL 8 removed querySkuDetailsAsync, the parameterless enablePendingPurchases(), and changed the onProductDetailsResponse signature to accept QueryProductDetailsResult. You must also use enableAutoServiceReconnection() instead of manual reconnection logic.