google-mobile-ads-android-migrate-to-next-gen
Skill by google
Migrates Android apps from the legacy Google Mobile Ads SDK (play-services-ads) to the GMA Next-Gen SDK (ads-mobile-sdk). It is for developers with an existing Android codebase who need import, class and method mapping tables.
Install google-mobile-ads-android-migrate-to-next-gen
Built from the published package, never by AI.
git clone --depth 1 https://github.com/google/skills /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/skills/ads/google-mobile-ads-android-migrate-to-next-gen ~/.claude/skills/google-mobile-ads-android-migrate-to-nexRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install google-mobile-ads-android-migrate-to-next-gen in Claude Code
git clone --depth 1 https://github.com/google/skills /tmp/skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/skills/skills/ads/google-mobile-ads-android-migrate-to-next-gen ~/.gemini/antigravity-cli/skills/google-mobile-ads-android-migrate-to-nexAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install google-mobile-ads-android-migrate-to-next-gen in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This agent skill guides an AI assistant through migrating an Android app from the legacy Google Mobile Ads SDK (com.google.android.gms:play-services-ads) to the GMA Next-Gen SDK (com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk). It provides mapping tables for imports, classes and method signatures to help decide each migration step.
The workflow covers Gradle changes, including replacing the dependency, updating minSdk to 24 and compileSdk to 34, and excluding the old SDK artifacts. It then covers per-file refactoring and a clean build with gradle build -x test. The skill also lists rules for the app ID, initialization order, UI thread handling in callbacks, and native ad changes. It is aimed at developers with an existing Android codebase that uses the old GMA SDK.
Written from the project's SKILL.md and checked against it.
What it can do
- Gradle migrationReplaces the old play-services-ads dependency with the latest ads-mobile-sdk version.
- API mapping tablesMaps old SDK imports, classes and callbacks to their GMA Next-Gen SDK equivalents.
- Method mappingLists method signature changes to guide per-file refactoring of the codebase.
- Initialization rulesExplains the required order for MobileAds.initialize() and RequestConfiguration handling.
- UI thread guidanceRequires wrapping UI work in callbacks with runOnUiThread or Dispatchers.Main.
- Native ad changesDescribes new NativeAdRequest.Builder methods and the registerNativeAd approach for media views.
- Banner collapsible checkShows how to check whether a banner ad is collapsible in the new SDK.
- Build verificationRuns a clean build with gradle build -x test and resolves GMA-related compile errors.
What you need
- An existing Android app that uses the legacy GMA SDK
- Gradle build setup
- Android minSdk 24 or higher and compileSdk 34 or higher
- Maven access or curl to fetch the latest SDK version
Try asking
- Migrate my Android app from play-services-ads to the GMA Next-Gen SDK
- Update my Gradle files to use ads-mobile-sdk and exclude the old ads SDK
- Convert my AdView and InterstitialAd imports to the Next-Gen SDK classes
Good to know
- Callbacks in the Next-Gen SDK run on a background thread, so UI work must be wrapped.
- Mute This Ad logic is unsupported and must be removed.
- AdView no longer has pause(), resume() or setAdSize().
- Mediation adapter classes must keep using com.google.android.gms.ads.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/ads/google-mobile-ads-android-migrate-to-next-gen/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md39 KB
Alternatives to google-mobile-ads-android-migrate-to-next-gen
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
google-mobile-ads-android-migrate-to-next-gen: common questions
What does the GMA Next-Gen SDK replace?
The source says the Next-Gen SDK replaces the legacy com.google.android.gms:play-services-ads dependency with com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk.
Do I need to keep the AndroidManifest meta-data tag?
Yes. The source says to preserve the com.google.android.gms.ads.APPLICATION_ID meta-data tag because the User Messaging Platform SDK still requires it.
Are ad preloading methods changed in the Next-Gen SDK?
The source says ad preloading methods keep the same API signatures and parameters as the old SDK, unless the mapping table states otherwise.
How do I install google-mobile-ads-android-migrate-to-next-gen?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is google-mobile-ads-android-migrate-to-next-gen free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is google-mobile-ads-android-migrate-to-next-gen safe to use?
It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to google-mobile-ads-android-migrate-to-next-gen?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
