play-billing-library-version-upgrade

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

1|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/kariemSeiam/android-claw --skill play-billing-library-version-upgrade-kariemseiam
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: play-billing-library-version-upgrade
Source: https://github.com/kariemSeiam/android-claw/tree/main/skills/installed/play-play-billing-library-version-upgrade
Command: npx skills add https://github.com/kariemSeiam/android-claw --skill play-billing-library-version-upgrade-kariemseiam

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, removed methods, and new SDK requirements that are easy to miss. This Skill automates the detection, planning, and execution of a safe migration path so your in-app purchase code keeps working on the latest PBL release. ## 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 to jump directly to the target version or migrate two major versions at a time, with intermediate build verification at each step. - Intent-Based Refactoring: Replaces legacy patterns with modern equivalents, such as swapping SkuDetails for ProductDetails, ProrationMode for ReplacementMode, and manual reconnection logic for enableAutoServiceReconnection(). - Use Case: Your app still uses PBL v4 with queryPurchases() and SkuDetails. The Skill detects the effective version, plans a stepped v4 → v6 → v8 path, refactors all billing code, and validates with a clean Gradle build and unit tests. ## 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 or libs.versions.toml, then refactor deprecated APIs per the official migration guides. This Skill automates detection of your effective version, plans a direct or stepped migration path, and verifies each step with Gradle builds.

How to migrate from SkuDetails to ProductDetails in Play Billing?▼

Replace all SkuDetails usage with ProductDetails, which supports multiple subscription 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 8 require?▼

Play Billing Library 8.0 requires compileSdk 35, while PBL 7.0 requires compileSdk 34. PBL 8.1 also raised minSdkVersion to 23, so verify your Gradle configuration meets these requirements before upgrading.

Why was my billing code broken after upgrading PBL?▼

Major PBL versions remove deprecated APIs such as queryPurchases(), querySkuDetailsAsync(), and parameterless enablePendingPurchases(). Check the release notes for removed methods and replace them with the documented modern equivalents like queryPurchasesAsync with QueryPurchasesParams.

When should I use a stepped migration instead of a direct upgrade?▼

Use a stepped migration when your effective version is more than two major versions behind the target. Migrate two major versions at a time, running ./gradlew assembleDebug after each intermediate step to catch breaking changes incrementally.