Agent skill · software engineering · google

google-mobile-ads-android-migrate-to-next-gen

Migrates Android applications from the old, legacy Google Mobile

Why this skill is useful

Provides detailed migration steps and specific API mappings for transitioning to the GMA Next-Gen SDK that the AI wouldn't reliably generate on its own.

What it needs

Requires gradle installed locally. About 4k tokens when loaded. Last updated 2026-08-06. 15,831 stars on the source repository.

What this skill does

AI Migration Agent Instructions for the Google Mobile Ads SDK Migration Workflow Use this checklist to track your migration progress: Configure Gradle: [ ] Replace com.google.android.gms:play-services-ads with the latest stable version of com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk. If you cannot access Maven directly, run the following command to fetch the latest version. The version returned in the latest tag is the latest version of the GMA Next-Gen SDK: [ ] Update minSdk (24+) and compileSdk (34+). [ ] Exclude play-services-ads and play-services-ads-lite from all dependencies globally in the app-level build file to avoid duplicate symbol errors. [ ] Sync Gradle before moving on to the next step. Per-File Migration: [ ] Refactor the codebase following the API Mapping and Method Mapping tables to migrate imports, class names, and method signature to GMA Next-Gen SDK. Verify and Build: [ ] Run gradle build -x test to confirm a successful clean build. Resolve any GMA SDK related compile errors. Core Migration Rules App ID Usage: Always use the value of the com.google.android.gms.ads.APPLICATIONID meta-data tag from AndroidManifest.xml for the applicationId in InitializationConfig. Constraint: Preserve the <meta-data> tag in the manifest; it is still required for publishers using the User Messaging Platform SDK. Initialization Sequence: 1. Call MobileAds.initialize() on a background thread. 2. Ensure initialize() is called before any other SDK methods. 3. If using RequestConfiguration, bundle it into InitializationConfig.Builder.setRequestConfiguration(). Do not call MobileAds.setRequestConfiguration() before initialization. UI Threading: MANDATORY: Callbacks in GMA-Next Gen SDK are invoked on a background thread. ALL UI-RELATED OPERATIONS (e.g., Toasts, View updates, Fragment transactions) MUST be wrapped in runOnUiThread {} or Dispatchers.Main.launch {} within GMA SDK callbacks. SKIPPING THIS STEP WILL CAUSE THE APPLICATION TO CRASH. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills google/google-mobile-ads-android-migrate-to-next-gen

View the source on GitHub

Browse the @skills marketplace