[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M699QBJPJEGK6RD1FV1FXBP0":3,"skill-same:01M699QBJPJEGK6RD1FV1FXBP0":83},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":52,"linkOnly":53,"markdownContent":54,"markdownBody":55,"frontMatter":56,"refName":59,"commitSha":60,"skillDirectory":61,"forksCount":62,"repositoryHtmlUrl":63,"repositoryHomepageUrl":64,"ownerHtmlUrl":65,"ownerBlogUrl":66,"ownerDescription":67,"updatedAt":68,"install":69,"resources":82},"01M699QBJPJEGK6RD1FV1FXBP0","build-android-binary","PAM 控件 Android DEX 编译","Compile a PAM control's Android Kotlin module into the runtime-loadable DEX for a `.ppmplugin`. Creates a staged Gradle build with the pinned wrapper and `react-android` compile dependency, verifies manifest\u002Fmodule\u002Fpackage alignment and runtime-loading constraints, builds the release AAR, then runs `d8 --min-api 24`. Writes `ppmplugin\u002Fstaging\u002Fandroid\u002F\u003CPascalName>Plugin.dex` and surfaces actionable Gradle or d8 failures. Requires JDK 17+ and Android SDK Build-Tools 35.0.0; `d8` is located from the SDK and system Gradle is optional. Run after \u002Fgenerate-ppmplugin-manifest and before \u002Fassemble-ppmplugin.","将 PAM 控件的 Android Kotlin 模块编译为可供运行时加载的 DEX，用于 `.ppmplugin`。创建暂存式 Gradle 构建，采用固定版本的 wrapper 和 `react-android` 编译依赖，校验清单\u002F模块\u002F包的一致性及运行时加载约束，构建 release AAR，然后运行 `d8 --min-api 24`。输出 `ppmplugin\u002Fstaging\u002Fandroid\u002F\u003CPascalName>Plugin.dex`，并给出可操作的 Gradle 或 d8 失败信息。需要 JDK 17+ 和 Android SDK Build-Tools 35.0.0；`d8` 从 SDK 中定位，系统 Gradle 为可选项。在 \u002Fgenerate-ppmplugin-manifest 之后、\u002Fassemble-ppmplugin 之前运行。","microsoft\u002Fpower-platform-skills","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M699JVYJFB75D9JM70BN4H0Q",1149,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpower-apps-mobile-extension\u002Fskills\u002Fbuild-android-binary\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRN0CV1NMDZ5TEJX1GVM29","插件与技能管理","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],"build android binary","binary","build android","build","android","assemble","build-tools","loading","actionable","android kotlin","gradle","alignment","dependency","read","Bash","api","PAM","run","generate","react","sdk","2026-11-10 10:12:30",false,"---\nname: build-android-binary\ndescription: \"Compile a PAM control's Android Kotlin module into the runtime-loadable DEX for a `.ppmplugin`. Creates a staged Gradle build with the pinned wrapper and `react-android` compile dependency, verifies manifest\u002Fmodule\u002Fpackage alignment and runtime-loading constraints, builds the release AAR, then runs `d8 --min-api 24`. Writes `ppmplugin\u002Fstaging\u002Fandroid\u002F\u003CPascalName>Plugin.dex` and surfaces actionable Gradle or d8 failures. Requires JDK 17+ and Android SDK Build-Tools 35.0.0; `d8` is located from the SDK and system Gradle is optional. Run after \u002Fgenerate-ppmplugin-manifest and before \u002Fassemble-ppmplugin.\"\nallowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion, Skill\nmodel: sonnet\n---\n\n# \u002Fbuild-android-binary\n\nTurns the extension's Android **source** (`android\u002F...\u002F\u003CPascal>Module.kt` + `\u003CPascal>Package.kt`) into the **DEX binary** that the wrap runtime loads at runtime via `DexClassLoader`. This is the heavyweight, toolchain-dependent step of producing a `.ppmplugin`: source code in, a runnable `\u003CPascal>Plugin.dex` out.\n\n> Naming note: this skill runs Gradle's `assembleRelease` task internally. Don't confuse that with [`\u002Fassemble-ppmplugin`](..\u002Fassemble-ppmplugin\u002FSKILL.md), which zips the final bundle — different layers. This skill produces a *binary*; that one produces the *bundle*.\n\n> **Cross-platform:** runs on macOS, Linux, **and** Windows — the Android path has no Mac-only step (JDK 17, Gradle, and Android SDK `d8` exist on all three). Every shell command below is given in both bash and PowerShell forms per shared-instructions §5.\n\nRead [`shared\u002Fppmplugin-format.md`](..\u002F..\u002Fshared\u002Fppmplugin-format.md) §5 — the Android binary requirements this skill enforces.\n\n## What this skill does NOT do\n- Does not author `manifest.json` (run [`\u002Fgenerate-ppmplugin-manifest`](..\u002Fgenerate-ppmplugin-manifest\u002FSKILL.md) first — this skill reads it for cross-checks).\n- Does not zip the `.ppmplugin` — that's [`\u002Fassemble-ppmplugin`](..\u002Fassemble-ppmplugin\u002FSKILL.md).\n- Does not build iOS — that's `\u002Fbuild-ios-binary` (Mac-only).\n- Does not modify the canonical `android\u002F` — all standalone adjustments are made to a throwaway copy under `ppmplugin\u002Fstaging\u002Fandroid-build\u002F` (Step 2). The source the engineer maintains is never touched.\n\n---\n\n## Step 1 — Read shared docs + prereq block\n\n1. Read [`shared\u002Fshared-instructions.md`](..\u002F..\u002Fshared\u002Fshared-instructions.md) and [`shared\u002Fppmplugin-format.md`](..\u002F..\u002Fshared\u002Fppmplugin-format.md).\n2. Read `ppmplugin\u002Fstaging\u002Fmanifest.json`. If absent, STOP with `NEEDS_CONTEXT: manifest.json missing — run \u002Fgenerate-ppmplugin-manifest first` (the build cross-checks against it).\n2b. Read the `## ppmplugin (third-party controls)` block in `.extension-state.md`. **If a DEX already exists** at `ppmplugin\u002Fstaging\u002Fandroid\u002F\u003Cdex>`, do NOT silently overwrite it — surface it (with its build timestamp) and ask via `AskUserQuestion` whether to **replace** it:\n   - Source + `manifest.json` **unchanged** since the recorded `Android DEX: built` timestamp → recommend **Keep existing (reuse)** [default]; also offer **Replace (rebuild)**.\n   - Source or manifest **changed** → recommend **Replace (rebuild)** [default]; also offer **Keep existing** (note: stale — won't match current source).\n   On **Keep**, skip straight to Step 6 (report) using the existing DEX. On **Replace**, continue the rebuild. Building is always safe to repeat — this gate just respects an artifact you may have produced on purpose.\n3. Run prereq checks and print the visible block (shared-instructions §9.2). **Policy: resolve, don't punt.** Each check first tries to *satisfy itself* — locate a tool by its standard install path (not just PATH), or offer to run a safe install and execute it on `yes` (§1.5 auto-fix flow). A check only hard-BLOCKs when it needs something genuinely un-resolvable without a human (e.g. a role grant). \"Found but not on PATH\" is NOT a block — use the absolute path. Checks:\n\n| Check | Verify | Auto-fix |\n|---|---|---|\n| JDK 17 | `java -version` (17+) | OS-aware install per shared-instructions §1.5 (offer; user confirms) |\n| Gradle (bootstrap only) | `gradle --version` — **any** version is fine; it only generates the pinned wrapper (Step 2.3). A system Gradle isn't used for the build, so don't flag its version here. | install Gradle (OS-aware) if absent |\n| Android SDK Build-Tools 35 + `d8` | **Locate `d8`, don't require it on PATH** (see below) | If found anywhere, PASS. Only if no `d8` exists at all → auto-fix-on-confirm `\u003Csdkmanager> \"build-tools;35.0.0\"`. |\n| **Android platform 35** | `\u003Csdkmanager> --list_installed` includes `platforms;android-35`, or `$ANDROID_HOME\u002Fplatforms\u002Fandroid-35\u002F` exists | **Auto-fix on confirm:** run it (see below). |\n\n**Locating `d8` (do NOT block just because it's not on PATH).** A user with Android Studio has `d8` installed but rarely on PATH. Resolve it to an absolute path and *use that path* in Step 5:\n1. `command -v d8` \u002F `where d8.bat` — if on PATH, use it.\n2. Else search the SDK root (`$ANDROID_HOME`, else `$ANDROID_SDK_ROOT`, else mac default `~\u002FLibrary\u002FAndroid\u002Fsdk`, win default `%LOCALAPPDATA%\\Android\\Sdk`): pick `build-tools\u002F35*\u002Fd8` (mac\u002Flinux) or `build-tools\\35*\\d8.bat` (win). Prefer a 35.x build-tools; fall back to the highest available.\n3. Record the absolute path as **`$D8`** and PASS the check with a note: `✓ d8 found at \u003Cpath> (will invoke by absolute path)`. **Do not require a PATH edit.**\n4. BLOCK only if no `d8` exists anywhere → offer to install via `\u003Csdkmanager> \"build-tools;35.0.0\"` (`\u003Csdkmanager>` resolved the same way — search `$ANDROID_HOME\u002Fcmdline-tools\u002F*\u002Fbin\u002Fsdkmanager` and `$ANDROID_HOME\u002Ftools\u002Fbin\u002Fsdkmanager`, not just PATH).\n\n**Installing platform 35 (auto-fix on confirm).** When the platform-35 check fails, OFFER to run the install and wait for `yes` (shared-instructions §1.5 — execute, don't just print):\n```bash\n# if sdkmanager is missing entirely (mac):\nbrew install --cask android-commandlinetools\n# then (yes | …  auto-accepts the SDK licenses):\nyes | \u003Csdkmanager> \"platforms;android-35\"\n```\nRe-verify after, then proceed. Only STOP if the user declines or the install fails.\n\n**Why platform 35 specifically:** the standalone build compiles against `compileSdk 35` (Step 2), because RN 0.79's `react-android` AAR is built against compileSdk 35 and AGP forces consumers to `compileSdk ≥ 35`. That requires `platforms;android-35` and AGP 8.x (7.x can't compile against android-35). So **35 is the floor**, not \"34 or newer.\"\n\n---\n\n## Step 2 — Stage a standalone build copy (canonical `android\u002F` stays pristine)\n\nThe repo's `android\u002F` is a bare library module meant to be consumed by **the managed host build's** Gradle: it relies on the host to supply `rootProject.ext` values (`compileSdkVersion`, `minSdkVersion`, `kotlin_version`, read via `safeExtGet(...)`) **and** to put React Native on the classpath. Standalone, none of that exists — so the `safeExtGet` fallbacks apply and React doesn't resolve. Rather than mutate the canonical `android\u002Fbuild.gradle` (which would degrade the real source to satisfy a throwaway build), **build from a copy.**\n\n1. **Copy** `android\u002F` → `ppmplugin\u002Fstaging\u002Fandroid-build\u002F`. Delete + recopy fresh on every run so it never drifts from canonical. Apply these standalone adjustments to the **COPY only**:\n\n   a. **Pin React Native.** The generator now writes `compileOnly \"com.facebook.react:react-android:\u003CrnVersion>\"` directly, so on a freshly scaffolded control this is already correct and the step is a no-op — verify and move on. Older controls carry the legacy `implementation 'com.facebook.react:react-native:+'` (or the `compileOnly` variant of it); rewrite those in the copy to `compileOnly \"com.facebook.react:react-android:\u003CrnVersion>\"` (`\u003CrnVersion>` from `package.json` devDependencies, e.g. `0.79.7`). Standalone, the host doesn't supply React, and the modern Android coordinate is `react-android` (resolves from `mavenCentral()`). `compileOnly` so it is never bundled — RN is provided at runtime by the wrap shell. If you had to rewrite, say so: the canonical source is drifting and `\u002Fdebug-extension` should fix it there.\n\n   b. **Pin compileSdk to 35.** The standalone build has no managed host build `rootProject.ext`, so `safeExtGet('compileSdkVersion', …)` uses the control's own fallback (older controls default to 33) — which may be too low: RN 0.79's `react-android` AAR is built against **compileSdk 35**, and AGP refuses to let a `compileSdk \u003C 35` module compile against it. Set the copy's `compileSdkVersion` to **35** (and ensure `minSdkVersion` is **≥ 24**, the AAR's floor). This requires AGP 8.x (7.x can't compile against android-35). See [`ppmplugin-format.md §5`](..\u002F..\u002Fshared\u002Fppmplugin-format.md). Leave `targetSdkVersion` as-is if already ≥ 35.\n\n   c. Ensure both `google()` and `mavenCentral()` are in `repositories`.\n\n2. **Add `settings.gradle`** in the copy declaring the library as its own root project:\n   ```gradle\n   rootProject.name = \"\u003Clower>plugin\"\n   ```\n3. **Add a Gradle wrapper pinned to the version RN 0.79 uses with AGP 8.8.2.** RN 0.79 pairs AGP 8.8.2 with Gradle **8.13**. The wrapper MUST pin **8.13** (AGP 8.8 needs Gradle 8.10.2+; older Gradle fails).\n\n   **Preferred — write a pre-generated wrapper, skip the bootstrap.** Write `gradle\u002Fwrapper\u002Fgradle-wrapper.properties` directly into the staging copy, pinning **both** the distribution URL and its checksum, plus the `gradle-wrapper.jar` + `gradlew`\u002F`gradlew.bat` scripts:\n\n   ```properties\n   distributionUrl=https\\:\u002F\u002Fservices.gradle.org\u002Fdistributions\u002Fgradle-8.13-bin.zip\n   distributionSha256Sum=20f1b1176237254a6fc204d8434196fa11a4cfb387567519c61556e8710aed78\n   ```\n\n   `distributionSha256Sum` is mandatory, not optional. The first `.\u002Fgradlew` invocation downloads and then **executes** that archive; HTTPS alone authenticates the host, not the bytes. With the pin, Gradle verifies the distribution and aborts on mismatch — fail-closed. The value above is the SHA-256 Gradle publishes at `https:\u002F\u002Fservices.gradle.org\u002Fdistributions\u002Fgradle-8.13-bin.zip.sha256`; it is a constant of the 8.13 pin, so re-derive it from that endpoint whenever the Gradle version in [`shared-instructions.md §0`](..\u002F..\u002Fshared\u002Fshared-instructions.md) moves, and never hand-edit it to make a failing build pass.\n\n   **Verify the wrapper JAR before the first `.\u002Fgradlew`.** `gradle-wrapper.jar` is executed by `gradlew`, so it needs the same treatment as the distribution: copy it only from a trusted source — the control's own committed `android\u002Fgradle\u002Fwrapper\u002F` or a verified Gradle install — and verify it against the **official Gradle 8.13 wrapper JAR SHA-256** published at `https:\u002F\u002Fdownloads.gradle.org\u002Fdistributions\u002Fgradle-8.13-wrapper.jar.sha256`.\n\n   Official checksum (8.13):\n\n   ```text\n   81a82aaea5abcc8ff68b3dfcb58b3c3c429378efd98e7433460610fecd7ae45f\n   ```\n\n   Fail closed:\n\n   ```bash\n   cd ppmplugin\u002Fstaging\u002Fandroid-build\n    EXPECTED_WRAPPER_SHA256=81a82aaea5abcc8ff68b3dfcb58b3c3c429378efd98e7433460610fecd7ae45f\n    ACTUAL=$(shasum -a 256 gradle\u002Fwrapper\u002Fgradle-wrapper.jar | cut -d' ' -f1)\n    [ \"$ACTUAL\" = \"$EXPECTED_WRAPPER_SHA256\" ] || {\n       echo \"BLOCKED: gradle-wrapper.jar SHA-256 mismatch — expected $EXPECTED_WRAPPER_SHA256, got $ACTUAL\"; exit 1; }\n   ```\n\n   Never fetch either artifact from an unpinned third-party mirror, and never skip the check because the build is \"just a throwaway staging copy\" — the staging copy runs on the same machine with the same privileges.\n\n   **Fallback — if you must run `gradle wrapper`** and the system Gradle is too old for AGP 8.8.2: temporarily move `build.gradle` aside so the wrapper task has nothing to evaluate, generate the wrapper, then restore:\n   ```bash\n   cd ppmplugin\u002Fstaging\u002Fandroid-build\n   mv build.gradle build.gradle.tmp\n   gradle wrapper --gradle-version 8.13 --distribution-type bin \\\n     --gradle-distribution-sha256-sum 20f1b1176237254a6fc204d8434196fa11a4cfb387567519c61556e8710aed78\n   mv build.gradle.tmp build.gradle\n   ```\n   Either way, verify `gradle\u002Fwrapper\u002Fgradle-wrapper.properties` ends with `gradle-8.13-bin.zip` **and** carries the `distributionSha256Sum` line. Builds in Step 5 always invoke `.\u002Fgradlew` (the pinned wrapper), never the system `gradle`.\n\n4. **Generate `gradle.properties`** in the staging copy (the managed host build supplies these ambiently; standalone has none). **Without `android.useAndroidX=true` the androidx deps (appcompat, core-ktx) fail resource linking** — this is the single thing that turns the Android build from flaky to one-shot:\n   ```properties\n   android.useAndroidX=true\n   android.enableJetifier=false\n   org.gradle.jvmargs=-Xmx2048m\n   ```\n\nNo confirmation gate is needed for edits to the throwaway copy (the canonical source is untouched). Just **report the standalone adjustments applied** (the React coordinate swap + compileSdk 35 + generated `gradle.properties`) so the user knows how the build env differs from the managed host build's.\n\n---\n\n## Step 3 — Assert DexClassLoader constraints\n\nIf the expected Android module \u002F `ReactPackage` `.kt` files don't exist where `manifest.entrypoints.android.packageClass` implies, STOP with `NEEDS_CONTEXT: Android module structure missing — see shared\u002Frepo-layout.md` rather than letting Gradle fail cryptically (the manifest skill's structure preflight normally catches this first; this is the backstop if it was skipped).\n\nBefore building, verify the source satisfies the runtime-load constraints (ppmplugin-format §5). Read the Kotlin files and check:\n\n- **No `@ReactModule` annotation** anywhere in the module — it needs static symbols `DexClassLoader` can't see. If present, STOP with `BLOCKED: remove @ReactModule annotation (incompatible with DexClassLoader)`.\n- **`getName()`** return value equals `manifest.json` `receivers[].nativeModule`.\n- **ReactPackage FQN** equals `manifest.json` `entrypoints.android.packageClass`.\n- **The `ReactPackage` (packageClass) has a public no-arg constructor.** The wrap runtime instantiates it via `getDeclaredConstructor().newInstance()` — if the class declares only an arg-ed constructor, the plugin silently fails to load at runtime (`Loaded 0 plugin package(s)`), which no build error catches. Read the `\u003CPascal>Package.kt`: a bare `class \u003CPascal>Package : ReactPackage` is fine (implicit no-arg ctor); a `class \u003CPascal>Package(...)` with a primary-constructor parameter list is NOT. If it has parameters, STOP with `BLOCKED: ReactPackage \u003CPascal>Package must have a public no-arg constructor`.\n- **Each `@ReactMethod` takes exactly one `ReadableMap` request param** (then `Promise`) — the wrap proxy spreads the PCF's `args: [request]` positionally, so a method that expands the request into multiple positional params won't receive its data. If a `@ReactMethod`'s signature isn't `(request: ReadableMap, promise: Promise)`-shaped, surface a WARNING (it may be intentional for a no-arg op like `getStatus()` → `(promise: Promise)`, but a multi-positional-param method is almost always a dispatch-contract mistake — [ppmplugin-format §2](..\u002F..\u002Fshared\u002Fppmplugin-format.md)).\n- **No SDK-era imports** — the module source carries none of `INativeExtension`, `INativeOperation`, `INativeExtensionContext`, `sendAsync`, `handleMessageAsync`, `HermesBytecodeLoader`, or a `powerapps-native-extension` import. The bundle is native-only; the wrap host dispatches straight to `NativeModules.\u003CnativeModule>.\u003Cmethod>` ([ppmplugin-format §2](..\u002F..\u002Fshared\u002Fppmplugin-format.md) — *Runtime dispatch contract*), so an SDK symbol here is leakage that `\u002Faudit-ppmplugin`'s DEX scan will reject downstream. Catch it at the source: if present, STOP with `BLOCKED: SDK-era symbol '\u003Csym>' in module source — the .ppmplugin is native-only (no INativeExtension\u002FsendAsync layer)`.\n\nA mismatch here means the manifest and the binary disagree — the call won't reach the module on device. STOP with the specific mismatch rather than building a broken pair.\n\n---\n\n## Step 4 — Pre-flight cleanup\n\nStale outputs cause confusing collisions. Before building:\n- Remove any prior `ppmplugin\u002Fstaging\u002Fandroid\u002F\u003CPascal>Plugin.dex`.\n- The staging copy `ppmplugin\u002Fstaging\u002Fandroid-build\u002F` was recopied fresh in Step 2, so any `build\u002F` inside it is gone. The canonical `android\u002Fbuild\u002F` (from prior host builds) is irrelevant now — we never build there.\n\n---\n\n## Step 5 — Build AAR → DEX\n\nRun the build for real and surface output location, not the streaming log (shared-instructions §9):\n\n1. **Assemble the release AAR** from the staging copy — OS-aware wrapper invocation per shared-instructions §5:\n   ```bash\n   cd ppmplugin\u002Fstaging\u002Fandroid-build && .\u002Fgradlew :assembleRelease       # macOS \u002F Linux\n   ```\n   ```powershell\n   cd ppmplugin\\staging\\android-build; .\\gradlew.bat :assembleRelease     # Windows\n   ```\n   Output: `ppmplugin\u002Fstaging\u002Fandroid-build\u002Fbuild\u002Foutputs\u002Faar\u002F\u003Cmodule>-release.aar`. On failure, print the failing task + the most relevant Gradle error line and STOP with `BLOCKED: gradle assembleRelease failed — \u003Cline>` (per the dogfooding lesson: surface the real error, don't swallow it). Common standalone failures and their fixes are pinned in [`ppmplugin-format.md §5`](..\u002F..\u002Fshared\u002Fppmplugin-format.md) (compileSdk too low → missing platform 35; React unresolved → wrong coordinate). Also recognize `Cannot add extension with name 'kotlin'` → the copy's Kotlin-plugin application conflicts with its AGP (AGP 9.x bundles Kotlin; manual `kotlin-android` then collides). Rare here since we pin AGP 8.8.2 (which *needs* explicit `kotlin-android`) and build from the control's own gradle — but if it surfaces, align the copy's Kotlin-plugin application with AGP 8.8.2.\n\n2. **Extract `classes.jar` and compile to DEX** — OS-aware per shared-instructions §5 (`d8` on macOS\u002FLinux, `d8.bat` on Windows; the Windows SDK `build-tools\u002F\u003Cver>\u002F` folder must be on PATH):\n\n   macOS \u002F Linux (bash):\n   Invoke `d8` by the **absolute path `$D8` resolved in Step 1** (it is usually not on PATH) — do not assume a bare `d8` works.\n\n   ```bash\n   mkdir -p ppmplugin\u002Fstaging\u002Fandroid\n   work=$(mktemp -d)\n   cp ppmplugin\u002Fstaging\u002Fandroid-build\u002Fbuild\u002Foutputs\u002Faar\u002F\u003Cmodule>-release.aar \"$work\u002F\"\n   ( cd \"$work\" && jar xf \u003Cmodule>-release.aar classes.jar && \"$D8\" --min-api 24 --output . classes.jar )\n   cp \"$work\u002Fclasses.dex\" ppmplugin\u002Fstaging\u002Fandroid\u002F\u003CPascal>Plugin.dex\n   ```\n\n   Windows (PowerShell): `$D8` is the resolved `…\\build-tools\\35.0.0\\d8.bat`.\n   ```powershell\n   New-Item -ItemType Directory -Force ppmplugin\\staging\\android | Out-Null\n   $work = New-Item -ItemType Directory -Force (Join-Path $env:TEMP \"ppm-dex\")\n   Copy-Item ppmplugin\\staging\\android-build\\build\\outputs\\aar\\\u003Cmodule>-release.aar $work\n   Push-Location $work\n   jar xf \u003Cmodule>-release.aar classes.jar\n   & $D8 --min-api 24 --output . classes.jar\n   Pop-Location\n   Copy-Item (Join-Path $work classes.dex) ppmplugin\\staging\\android\\\u003CPascal>Plugin.dex\n   ```\n\n   `d8` warnings of the form `Type com.facebook.react.* was not found` are **expected and benign** (RN is `compileOnly`) — say so explicitly so the user doesn't read them as errors. Any *error* (non-warning) from `d8` → STOP with the line.\n\n3. Verify `ppmplugin\u002Fstaging\u002Fandroid\u002F\u003CPascal>Plugin.dex` exists and is non-empty.\n\n4. **Optional — native `.so` libraries.** If the module has JNI dependencies, the release AAR carries them under `jni\u002F\u003Cabi>\u002F*.so`. Extract those into `ppmplugin\u002Fstaging\u002Fandroid\u002Flib\u002F\u003Cabi>\u002F*.so` (`\u003Cabi>` ∈ `arm64-v8a`, `armeabi-v7a`, `x86`, `x86_64`) so `\u002Fassemble-ppmplugin` zips them under `android\u002Flib\u002F` — the wrap injector copies each ABI dir into the APK's `lib\u002F\u003Cabi>\u002F` ([`ppmplugin-format §5`](..\u002F..\u002Fshared\u002Fppmplugin-format.md)). Check with `jar tf \u003Cmodule>-release.aar | grep '^jni\u002F'`; if there are none (the common case — a pure-Kotlin control), skip this step.\n\n---\n\n## Step 6 — Report + next step\n\nUpdate the `## ppmplugin (third-party controls)` block in `.extension-state.md`: `Android DEX: built \u003CISO timestamp> (\u003Cdex name>)`. Print a fenced summary with the DEX path and size, then offer next steps via `AskUserQuestion` (shared-instructions §9.1):\n\n- **Run \u002Fassemble-ppmplugin** (recommended next — zip the manifest + DEX into the `.ppmplugin`)\n- **Re-run \u002Fgenerate-ppmplugin-manifest** (if the method list or names changed)\n- **Stay — I'll inspect the DEX first**\n\n**When the user picks a `Run \u002F…` option, immediately invoke that skill via the `Skill` tool in the same turn** (sub-skill invocation, shared-instructions §8 + §9.1 \"Execute, don't describe\"). Do NOT print a \"run it when ready\" instruction and stop. Only \"Stay\" ends the run.\n\nReturn `DONE` with the DEX path, or `DONE_WITH_CONCERNS` if the `@ReactMethod` count diverged from the documented operations (Step 1 of the manifest skill flags this).\n","# \u002Fbuild-android-binary\n\nTurns the extension's Android **source** (`android\u002F...\u002F\u003CPascal>Module.kt` + `\u003CPascal>Package.kt`) into the **DEX binary** that the wrap runtime loads at runtime via `DexClassLoader`. This is the heavyweight, toolchain-dependent step of producing a `.ppmplugin`: source code in, a runnable `\u003CPascal>Plugin.dex` out.\n\n> Naming note: this skill runs Gradle's `assembleRelease` task internally. Don't confuse that with [`\u002Fassemble-ppmplugin`](..\u002Fassemble-ppmplugin\u002FSKILL.md), which zips the final bundle — different layers. This skill produces a *binary*; that one produces the *bundle*.\n\n> **Cross-platform:** runs on macOS, Linux, **and** Windows — the Android path has no Mac-only step (JDK 17, Gradle, and Android SDK `d8` exist on all three). Every shell command below is given in both bash and PowerShell forms per shared-instructions §5.\n\nRead [`shared\u002Fppmplugin-format.md`](..\u002F..\u002Fshared\u002Fppmplugin-format.md) §5 — the Android binary requirements this skill enforces.\n\n## What this skill does NOT do\n- Does not author `manifest.json` (run [`\u002Fgenerate-ppmplugin-manifest`](..\u002Fgenerate-ppmplugin-manifest\u002FSKILL.md) first — this skill reads it for cross-checks).\n- Does not zip the `.ppmplugin` — that's [`\u002Fassemble-ppmplugin`](..\u002Fassemble-ppmplugin\u002FSKILL.md).\n- Does not build iOS — that's `\u002Fbuild-ios-binary` (Mac-only).\n- Does not modify the canonical `android\u002F` — all standalone adjustments are made to a throwaway copy under `ppmplugin\u002Fstaging\u002Fandroid-build\u002F` (Step 2). The source the engineer maintains is never touched.\n\n---\n\n## Step 1 — Read shared docs + prereq block\n\n1. Read [`shared\u002Fshared-instructions.md`](..\u002F..\u002Fshared\u002Fshared-instructions.md) and [`shared\u002Fppmplugin-format.md`](..\u002F..\u002Fshared\u002Fppmplugin-format.md).\n2. Read `ppmplugin\u002Fstaging\u002Fmanifest.json`. If absent, STOP with `NEEDS_CONTEXT: manifest.json missing — run \u002Fgenerate-ppmplugin-manifest first` (the build cross-checks against it).\n2b. Read the `## ppmplugin (third-party controls)` block in `.extension-state.md`. **If a DEX already exists** at `ppmplugin\u002Fstaging\u002Fandroid\u002F\u003Cdex>`, do NOT silently overwrite it — surface it (with its build timestamp) and ask via `AskUserQuestion` whether to **replace** it:\n   - Source + `manifest.json` **unchanged** since the recorded `Android DEX: built` timestamp → recommend **Keep existing (reuse)** [default]; also offer **Replace (rebuild)**.\n   - Source or manifest **changed** → recommend **Replace (rebuild)** [default]; also offer **Keep existing** (note: stale — won't match current source).\n   On **Keep**, skip straight to Step 6 (report) using the existing DEX. On **Replace**, continue the rebuild. Building is always safe to repeat — this gate just respects an artifact you may have produced on purpose.\n3. Run prereq checks and print the visible block (shared-instructions §9.2). **Policy: resolve, don't punt.** Each check first tries to *satisfy itself* — locate a tool by its standard install path (not just PATH), or offer to run a safe install and execute it on `yes` (§1.5 auto-fix flow). A check only hard-BLOCKs when it needs something genuinely un-resolvable without a human (e.g. a role grant). \"Found but not on PATH\" is NOT a block — use the absolute path. Checks:\n\n| Check | Verify | Auto-fix |\n|---|---|---|\n| JDK 17 | `java -version` (17+) | OS-aware install per shared-instructions §1.5 (offer; user confirms) |\n| Gradle (bootstrap only) | `gradle --version` — **any** version is fine; it only generates the pinned wrapper (Step 2.3). A system Gradle isn't used for the build, so don't flag its version here. | install Gradle (OS-aware) if absent |\n| Android SDK Build-Tools 35 + `d8` | **Locate `d8`, don't require it on PATH** (see below) | If found anywhere, PASS. Only if no `d8` exists at all → auto-fix-on-confirm `\u003Csdkmanager> \"build-tools;35.0.0\"`. |\n| **Android platform 35** | `\u003Csdkmanager> --list_installed` includes `platforms;android-35`, or `$ANDROID_HOME\u002Fplatforms\u002Fandroid-35\u002F` exists | **Auto-fix on confirm:** run it (see below). |\n\n**Locating `d8` (do NOT block just because it's not on PATH).** A user with Android Studio has `d8` installed but rarely on PATH. Resolve it to an absolute path and *use that path* in Step 5:\n1. `command -v d8` \u002F `where d8.bat` — if on PATH, use it.\n2. Else search the SDK root (`$ANDROID_HOME`, else `$ANDROID_SDK_ROOT`, else mac default `~\u002FLibrary\u002FAndroid\u002Fsdk`, win default `%LOCALAPPDATA%\\Android\\Sdk`): pick `build-tools\u002F35*\u002Fd8` (mac\u002Flinux) or `build-tools\\35*\\d8.bat` (win). Prefer a 35.x build-tools; fall back to the highest available.\n3. Record the absolute path as **`$D8`** and PASS the check with a note: `✓ d8 found at \u003Cpath> (will invoke by absolute path)`. **Do not require a PATH edit.**\n4. BLOCK only if no `d8` exists anywhere → offer to install via `\u003Csdkmanager> \"build-tools;35.0.0\"` (`\u003Csdkmanager>` resolved the same way — search `$ANDROID_HOME\u002Fcmdline-tools\u002F*\u002Fbin\u002Fsdkmanager` and `$ANDROID_HOME\u002Ftools\u002Fbin\u002Fsdkmanager`, not just PATH).\n\n**Installing platform 35 (auto-fix on confirm).** When the platform-35 check fails, OFFER to run the install and wait for `yes` (shared-instructions §1.5 — execute, don't just print):\n```bash\n# if sdkmanager is missing entirely (mac):\nbrew install --cask android-commandlinetools\n# then (yes | …  auto-accepts the SDK licenses):\nyes | \u003Csdkmanager> \"platforms;android-35\"\n```\nRe-verify after, then proceed. Only STOP if the user declines or the install fails.\n\n**Why platform 35 specifically:** the standalone build compiles against `compileSdk 35` (Step 2), because RN 0.79's `react-android` AAR is built against compileSdk 35 and AGP forces consumers to `compileSdk ≥ 35`. That requires `platforms;android-35` and AGP 8.x (7.x can't compile against android-35). So **35 is the floor**, not \"34 or newer.\"\n\n---\n\n## Step 2 — Stage a standalone build copy (canonical `android\u002F` stays pristine)\n\nThe repo's `android\u002F` is a bare library module meant to be consumed by **the managed host build's** Gradle: it relies on the host to supply `rootProject.ext` values (`compileSdkVersion`, `minSdkVersion`, `kotlin_version`, read via `safeExtGet(...)`) **and** to put React Native on the classpath. Standalone, none of that exists — so the `safeExtGet` fallbacks apply and React doesn't resolve. Rather than mutate the canonical `android\u002Fbuild.gradle` (which would degrade the real source to satisfy a throwaway build), **build from a copy.**\n\n1. **Copy** `android\u002F` → `ppmplugin\u002Fstaging\u002Fandroid-build\u002F`. Delete + recopy fresh on every run so it never drifts from canonical. Apply these standalone adjustments to the **COPY only**:\n\n   a. **Pin React Native.** The generator now writes `compileOnly \"com.facebook.react:react-android:\u003CrnVersion>\"` directly, so on a freshly scaffolded control this is already correct and the step is a no-op — verify and move on. Older controls carry the legacy `implementation 'com.facebook.react:react-native:+'` (or the `compileOnly` variant of it); rewrite those in the copy to `compileOnly \"com.facebook.react:react-android:\u003CrnVersion>\"` (`\u003CrnVersion>` from `package.json` devDependencies, e.g. `0.79.7`). Standalone, the host doesn't supply React, and the modern Android coordinate is `react-android` (resolves from `mavenCentral()`). `compileOnly` so it is never bundled — RN is provided at runtime by the wrap shell. If you had to rewrite, say so: the canonical source is drifting and `\u002Fdebug-extension` should fix it there.\n\n   b. **Pin compileSdk to 35.** The standalone build has no managed host build `rootProject.ext`, so `safeExtGet('compileSdkVersion', …)` uses the control's own fallback (older controls default to 33) — which may be too low: RN 0.79's `react-android` AAR is built against **compileSdk 35**, and AGP refuses to let a `compileSdk \u003C 35` module compile against it. Set the copy's `compileSdkVersion` to **35** (and ensure `minSdkVersion` is **≥ 24**, the AAR's floor). This requires AGP 8.x (7.x can't compile against android-35). See [`ppmplugin-format.md §5`](..\u002F..\u002Fshared\u002Fppmplugin-format.md). Leave `targetSdkVersion` as-is if already ≥ 35.\n\n   c. Ensure both `google()` and `mavenCentral()` are in `repositories`.\n\n2. **Add `settings.gradle`** in the copy declaring the library as its own root project:\n   ```gradle\n   rootProject.name = \"\u003Clower>plugin\"\n   ```\n3. **Add a Gradle wrapper pinned to the version RN 0.79 uses with AGP 8.8.2.** RN 0.79 pairs AGP 8.8.2 with Gradle **8.13**. The wrapper MUST pin **8.13** (AGP 8.8 needs Gradle 8.10.2+; older Gradle fails).\n\n   **Preferred — write a pre-generated wrapper, skip the bootstrap.** Write `gradle\u002Fwrapper\u002Fgradle-wrapper.properties` directly into the staging copy, pinning **both** the distribution URL and its checksum, plus the `gradle-wrapper.jar` + `gradlew`\u002F`gradlew.bat` scripts:\n\n   ```properties\n   distributionUrl=https\\:\u002F\u002Fservices.gradle.org\u002Fdistributions\u002Fgradle-8.13-bin.zip\n   distributionSha256Sum=20f1b1176237254a6fc204d8434196fa11a4cfb387567519c61556e8710aed78\n   ```\n\n   `distributionSha256Sum` is mandatory, not optional. The first `.\u002Fgradlew` invocation downloads and then **executes** that archive; HTTPS alone authenticates the host, not the bytes. With the pin, Gradle verifies the distribution and aborts on mismatch — fail-closed. The value above is the SHA-256 Gradle publishes at `https:\u002F\u002Fservices.gradle.org\u002Fdistributions\u002Fgradle-8.13-bin.zip.sha256`; it is a constant of the 8.13 pin, so re-derive it from that endpoint whenever the Gradle version in [`shared-instructions.md §0`](..\u002F..\u002Fshared\u002Fshared-instructions.md) moves, and never hand-edit it to make a failing build pass.\n\n   **Verify the wrapper JAR before the first `.\u002Fgradlew`.** `gradle-wrapper.jar` is executed by `gradlew`, so it needs the same treatment as the distribution: copy it only from a trusted source — the control's own committed `android\u002Fgradle\u002Fwrapper\u002F` or a verified Gradle install — and verify it against the **official Gradle 8.13 wrapper JAR SHA-256** published at `https:\u002F\u002Fdownloads.gradle.org\u002Fdistributions\u002Fgradle-8.13-wrapper.jar.sha256`.\n\n   Official checksum (8.13):\n\n   ```text\n   81a82aaea5abcc8ff68b3dfcb58b3c3c429378efd98e7433460610fecd7ae45f\n   ```\n\n   Fail closed:\n\n   ```bash\n   cd ppmplugin\u002Fstaging\u002Fandroid-build\n    EXPECTED_WRAPPER_SHA256=81a82aaea5abcc8ff68b3dfcb58b3c3c429378efd98e7433460610fecd7ae45f\n    ACTUAL=$(shasum -a 256 gradle\u002Fwrapper\u002Fgradle-wrapper.jar | cut -d' ' -f1)\n    [ \"$ACTUAL\" = \"$EXPECTED_WRAPPER_SHA256\" ] || {\n       echo \"BLOCKED: gradle-wrapper.jar SHA-256 mismatch — expected $EXPECTED_WRAPPER_SHA256, got $ACTUAL\"; exit 1; }\n   ```\n\n   Never fetch either artifact from an unpinned third-party mirror, and never skip the check because the build is \"just a throwaway staging copy\" — the staging copy runs on the same machine with the same privileges.\n\n   **Fallback — if you must run `gradle wrapper`** and the system Gradle is too old for AGP 8.8.2: temporarily move `build.gradle` aside so the wrapper task has nothing to evaluate, generate the wrapper, then restore:\n   ```bash\n   cd ppmplugin\u002Fstaging\u002Fandroid-build\n   mv build.gradle build.gradle.tmp\n   gradle wrapper --gradle-version 8.13 --distribution-type bin \\\n     --gradle-distribution-sha256-sum 20f1b1176237254a6fc204d8434196fa11a4cfb387567519c61556e8710aed78\n   mv build.gradle.tmp build.gradle\n   ```\n   Either way, verify `gradle\u002Fwrapper\u002Fgradle-wrapper.properties` ends with `gradle-8.13-bin.zip` **and** carries the `distributionSha256Sum` line. Builds in Step 5 always invoke `.\u002Fgradlew` (the pinned wrapper), never the system `gradle`.\n\n4. **Generate `gradle.properties`** in the staging copy (the managed host build supplies these ambiently; standalone has none). **Without `android.useAndroidX=true` the androidx deps (appcompat, core-ktx) fail resource linking** — this is the single thing that turns the Android build from flaky to one-shot:\n   ```properties\n   android.useAndroidX=true\n   android.enableJetifier=false\n   org.gradle.jvmargs=-Xmx2048m\n   ```\n\nNo confirmation gate is needed for edits to the throwaway copy (the canonical source is untouched). Just **report the standalone adjustments applied** (the React coordinate swap + compileSdk 35 + generated `gradle.properties`) so the user knows how the build env differs from the managed host build's.\n\n---\n\n## Step 3 — Assert DexClassLoader constraints\n\nIf the expected Android module \u002F `ReactPackage` `.kt` files don't exist where `manifest.entrypoints.android.packageClass` implies, STOP with `NEEDS_CONTEXT: Android module structure missing — see shared\u002Frepo-layout.md` rather than letting Gradle fail cryptically (the manifest skill's structure preflight normally catches this first; this is the backstop if it was skipped).\n\nBefore building, verify the source satisfies the runtime-load constraints (ppmplugin-format §5). Read the Kotlin files and check:\n\n- **No `@ReactModule` annotation** anywhere in the module — it needs static symbols `DexClassLoader` can't see. If present, STOP with `BLOCKED: remove @ReactModule annotation (incompatible with DexClassLoader)`.\n- **`getName()`** return value equals `manifest.json` `receivers[].nativeModule`.\n- **ReactPackage FQN** equals `manifest.json` `entrypoints.android.packageClass`.\n- **The `ReactPackage` (packageClass) has a public no-arg constructor.** The wrap runtime instantiates it via `getDeclaredConstructor().newInstance()` — if the class declares only an arg-ed constructor, the plugin silently fails to load at runtime (`Loaded 0 plugin package(s)`), which no build error catches. Read the `\u003CPascal>Package.kt`: a bare `class \u003CPascal>Package : ReactPackage` is fine (implicit no-arg ctor); a `class \u003CPascal>Package(...)` with a primary-constructor parameter list is NOT. If it has parameters, STOP with `BLOCKED: ReactPackage \u003CPascal>Package must have a public no-arg constructor`.\n- **Each `@ReactMethod` takes exactly one `ReadableMap` request param** (then `Promise`) — the wrap proxy spreads the PCF's `args: [request]` positionally, so a method that expands the request into multiple positional params won't receive its data. If a `@ReactMethod`'s signature isn't `(request: ReadableMap, promise: Promise)`-shaped, surface a WARNING (it may be intentional for a no-arg op like `getStatus()` → `(promise: Promise)`, but a multi-positional-param method is almost always a dispatch-contract mistake — [ppmplugin-format §2](..\u002F..\u002Fshared\u002Fppmplugin-format.md)).\n- **No SDK-era imports** — the module source carries none of `INativeExtension`, `INativeOperation`, `INativeExtensionContext`, `sendAsync`, `handleMessageAsync`, `HermesBytecodeLoader`, or a `powerapps-native-extension` import. The bundle is native-only; the wrap host dispatches straight to `NativeModules.\u003CnativeModule>.\u003Cmethod>` ([ppmplugin-format §2](..\u002F..\u002Fshared\u002Fppmplugin-format.md) — *Runtime dispatch contract*), so an SDK symbol here is leakage that `\u002Faudit-ppmplugin`'s DEX scan will reject downstream. Catch it at the source: if present, STOP with `BLOCKED: SDK-era symbol '\u003Csym>' in module source — the .ppmplugin is native-only (no INativeExtension\u002FsendAsync layer)`.\n\nA mismatch here means the manifest and the binary disagree — the call won't reach the module on device. STOP with the specific mismatch rather than building a broken pair.\n\n---\n\n## Step 4 — Pre-flight cleanup\n\nStale outputs cause confusing collisions. Before building:\n- Remove any prior `ppmplugin\u002Fstaging\u002Fandroid\u002F\u003CPascal>Plugin.dex`.\n- The staging copy `ppmplugin\u002Fstaging\u002Fandroid-build\u002F` was recopied fresh in Step 2, so any `build\u002F` inside it is gone. The canonical `android\u002Fbuild\u002F` (from prior host builds) is irrelevant now — we never build there.\n\n---\n\n## Step 5 — Build AAR → DEX\n\nRun the build for real and surface output location, not the streaming log (shared-instructions §9):\n\n1. **Assemble the release AAR** from the staging copy — OS-aware wrapper invocation per shared-instructions §5:\n   ```bash\n   cd ppmplugin\u002Fstaging\u002Fandroid-build && .\u002Fgradlew :assembleRelease       # macOS \u002F Linux\n   ```\n   ```powershell\n   cd ppmplugin\\staging\\android-build; .\\gradlew.bat :assembleRelease     # Windows\n   ```\n   Output: `ppmplugin\u002Fstaging\u002Fandroid-build\u002Fbuild\u002Foutputs\u002Faar\u002F\u003Cmodule>-release.aar`. On failure, print the failing task + the most relevant Gradle error line and STOP with `BLOCKED: gradle assembleRelease failed — \u003Cline>` (per the dogfooding lesson: surface the real error, don't swallow it). Common standalone failures and their fixes are pinned in [`ppmplugin-format.md §5`](..\u002F..\u002Fshared\u002Fppmplugin-format.md) (compileSdk too low → missing platform 35; React unresolved → wrong coordinate). Also recognize `Cannot add extension with name 'kotlin'` → the copy's Kotlin-plugin application conflicts with its AGP (AGP 9.x bundles Kotlin; manual `kotlin-android` then collides). Rare here since we pin AGP 8.8.2 (which *needs* explicit `kotlin-android`) and build from the control's own gradle — but if it surfaces, align the copy's Kotlin-plugin application with AGP 8.8.2.\n\n2. **Extract `classes.jar` and compile to DEX** — OS-aware per shared-instructions §5 (`d8` on macOS\u002FLinux, `d8.bat` on Windows; the Windows SDK `build-tools\u002F\u003Cver>\u002F` folder must be on PATH):\n\n   macOS \u002F Linux (bash):\n   Invoke `d8` by the **absolute path `$D8` resolved in Step 1** (it is usually not on PATH) — do not assume a bare `d8` works.\n\n   ```bash\n   mkdir -p ppmplugin\u002Fstaging\u002Fandroid\n   work=$(mktemp -d)\n   cp ppmplugin\u002Fstaging\u002Fandroid-build\u002Fbuild\u002Foutputs\u002Faar\u002F\u003Cmodule>-release.aar \"$work\u002F\"\n   ( cd \"$work\" && jar xf \u003Cmodule>-release.aar classes.jar && \"$D8\" --min-api 24 --output . classes.jar )\n   cp \"$work\u002Fclasses.dex\" ppmplugin\u002Fstaging\u002Fandroid\u002F\u003CPascal>Plugin.dex\n   ```\n\n   Windows (PowerShell): `$D8` is the resolved `…\\build-tools\\35.0.0\\d8.bat`.\n   ```powershell\n   New-Item -ItemType Directory -Force ppmplugin\\staging\\android | Out-Null\n   $work = New-Item -ItemType Directory -Force (Join-Path $env:TEMP \"ppm-dex\")\n   Copy-Item ppmplugin\\staging\\android-build\\build\\outputs\\aar\\\u003Cmodule>-release.aar $work\n   Push-Location $work\n   jar xf \u003Cmodule>-release.aar classes.jar\n   & $D8 --min-api 24 --output . classes.jar\n   Pop-Location\n   Copy-Item (Join-Path $work classes.dex) ppmplugin\\staging\\android\\\u003CPascal>Plugin.dex\n   ```\n\n   `d8` warnings of the form `Type com.facebook.react.* was not found` are **expected and benign** (RN is `compileOnly`) — say so explicitly so the user doesn't read them as errors. Any *error* (non-warning) from `d8` → STOP with the line.\n\n3. Verify `ppmplugin\u002Fstaging\u002Fandroid\u002F\u003CPascal>Plugin.dex` exists and is non-empty.\n\n4. **Optional — native `.so` libraries.** If the module has JNI dependencies, the release AAR carries them under `jni\u002F\u003Cabi>\u002F*.so`. Extract those into `ppmplugin\u002Fstaging\u002Fandroid\u002Flib\u002F\u003Cabi>\u002F*.so` (`\u003Cabi>` ∈ `arm64-v8a`, `armeabi-v7a`, `x86`, `x86_64`) so `\u002Fassemble-ppmplugin` zips them under `android\u002Flib\u002F` — the wrap injector copies each ABI dir into the APK's `lib\u002F\u003Cabi>\u002F` ([`ppmplugin-format §5`](..\u002F..\u002Fshared\u002Fppmplugin-format.md)). Check with `jar tf \u003Cmodule>-release.aar | grep '^jni\u002F'`; if there are none (the common case — a pure-Kotlin control), skip this step.\n\n---\n\n## Step 6 — Report + next step\n\nUpdate the `## ppmplugin (third-party controls)` block in `.extension-state.md`: `Android DEX: built \u003CISO timestamp> (\u003Cdex name>)`. Print a fenced summary with the DEX path and size, then offer next steps via `AskUserQuestion` (shared-instructions §9.1):\n\n- **Run \u002Fassemble-ppmplugin** (recommended next — zip the manifest + DEX into the `.ppmplugin`)\n- **Re-run \u002Fgenerate-ppmplugin-manifest** (if the method list or names changed)\n- **Stay — I'll inspect the DEX first**\n\n**When the user picks a `Run \u002F…` option, immediately invoke that skill via the `Skill` tool in the same turn** (sub-skill invocation, shared-instructions §8 + §9.1 \"Execute, don't describe\"). Do NOT print a \"run it when ready\" instruction and stop. Only \"Stay\" ends the run.\n\nReturn `DONE` with the DEX path, or `DONE_WITH_CONCERNS` if the `@ReactMethod` count diverged from the documented operations (Step 1 of the manifest skill flags this).\n",{"name":5,"model":57,"description":7,"allowed-tools":58},"sonnet","Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion, Skill","main","0a55a88fa2855404029d1e5450faf92878baf763","plugins\u002Fpower-apps-mobile-extension\u002Fskills\u002Fbuild-android-binary",232,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills","https:\u002F\u002Fmicrosoft.github.io\u002Fpower-platform-skills\u002F","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-14 21:46:39",{"source":9,"skillName":5,"commands":70,"prompt":80,"zipAvailable":81},[71,74,77],{"tool":72,"command":73},"npx","npx skills add microsoft\u002Fpower-platform-skills --skill build-android-binary",{"tool":75,"command":76},"bunx","bunx skills add microsoft\u002Fpower-platform-skills --skill build-android-binary",{"tool":78,"command":79},"pnpm","pnpm dlx skills add microsoft\u002Fpower-platform-skills --skill build-android-binary","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpower-apps-mobile-extension\u002Fskills\u002Fbuild-android-binary\u002FSKILL.md",true,[],[84,92,120,146,170,188],{"skillNo":85,"name":86,"nameZh":17,"description":87,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":91},"01M78JN2BFRRV1J54Q6WKZQ08D","compare-site-configurations","Compare Power Pages site configurations between two environments, such as dev, test and production, or between a local download and the live site, and explain which differences change site behavior. Use when a site works in one environment but not another (for example, works in dev but fails in test), to check configuration drift before promoting or deploying, or to see what changed between two sites. Produces a shareable HTML report and a JSON file that VS Code can import.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpower-pages\u002Fskills\u002Fcompare-site-configurations\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":93,"name":94,"nameZh":95,"description":96,"descriptionZh":97,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":98,"categories":99,"keywords":106,"publishedAt":52},"01M699WVHX0XN59EPBTTPEKYPG","setup","Process Intelligence 配置与登录","Use when Process Intelligence needs building, explicit cloud\u002Faccount\u002Fenvironment configuration, sign-in, connection diagnostics, or recovery from an authentication error.","当 Process Intelligence 需要搭建、显式的云\u002F账户\u002F环境配置、登录、连接诊断，或从认证错误中恢复时使用。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Fsetup\u002FSKILL.md",[100,103],{"categoryNo":101,"categoryName":102,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD4WETX0HM3SM9QKQ15B","SRE 工程师",{"categoryNo":104,"categoryName":105,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSTR9G4A4GZ0VB2DFN9490","开发环境与工具链管理",[94,107,108,109,110,111,112,113,114,115,45,116,117,118,44,119],"configuration","diagnostics","error","environment","cloud","when","connection","authentication","use","recovery","process","sign","intelligence",{"skillNo":121,"name":122,"nameZh":123,"description":124,"descriptionZh":125,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":126,"categories":127,"keywords":134,"publishedAt":52},"01M699WSR9EX55YY1WD9J22FEG","report-issue","流程智能问题报告撰写","Use when the user wants a Process Intelligence bug-report draft or support summary for a failed operation.","当用户需要针对失败操作起草流程智能（Process Intelligence）缺陷报告或支持摘要时使用。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Freport-issue\u002FSKILL.md",[128,131],{"categoryNo":129,"categoryName":130,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD5CX980XNXCJKQF70BY","数据分析师",{"categoryNo":132,"categoryName":133,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRSRYQ3M8N5063NNQPF2B1","调试与故障排查",[135,136,137,138,115,112,139,140,117,141,119,142,143,144,145],"issue","report","report issue","bug-report","operation","draft","bug","summary","user","for","support",{"skillNo":147,"name":148,"nameZh":149,"description":150,"descriptionZh":151,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":152,"categories":153,"keywords":158,"publishedAt":52},"01M699WR26YQ9Q21KE6MJF5B2G","investigate-process","流程挖掘问题调查","Use when a broad Process Mining business question, observed pattern or competing explanation needs investigation across analytical perspectives.","当需要从多个分析视角调查宽泛的流程挖掘（Process Mining）业务问题、观察到的模式或相互竞争的解释时使用。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Finvestigate-process\u002FSKILL.md",[154,157],{"categoryNo":155,"categoryName":156,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQGD4CMBM6B4PWSM1NXGT9","数据分析与报告",{"categoryNo":129,"categoryName":130,"taxonomyType":23,"taxonomyTypeDesc":24},[159,117,160,161,115,162,163,112,164,165,166,44,167,168,169],"investigate","investigate process","question","process mining","business","across","perspectives","mining","pattern","investigation","analytical",{"skillNo":171,"name":172,"nameZh":173,"description":174,"descriptionZh":175,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":176,"categories":177,"keywords":180,"publishedAt":52},"01M699WP9SDG5ZR12P8VYNXKTN","derive-metric","派生指标计算","Use when a requested measure is missing, a saved custom metric needs reuse, or an ephemeral formula or derived scalar is needed.","当所需的度量指标缺失、需要复用已保存的自定义指标，或需要临时公式或派生标量时使用。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Fderive-metric\u002FSKILL.md",[178,179],{"categoryNo":155,"categoryName":156,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":129,"categoryName":130,"taxonomyType":23,"taxonomyTypeDesc":24},[181,182,183,184,185,186,115,112,187,44],"metric","derive metric","missing","formula","custom","reuse","saved",{"skillNo":189,"name":190,"nameZh":191,"description":192,"descriptionZh":193,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":194,"categories":195,"keywords":198,"publishedAt":52},"01M699WMG5R8P6SMTDAS1TKF9E","compare-cohorts","流程队列对比分析","Use when comparing process cohorts, departments, periods or before-and-after results under matched definitions.","用于在统一的定义下比较流程队列（cohort）、部门、时间段或前后结果。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Fcompare-cohorts\u002FSKILL.md",[196,197],{"categoryNo":155,"categoryName":156,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":129,"categoryName":130,"taxonomyType":23,"taxonomyTypeDesc":24},[199,200,115,112,201,117,44],"compare","compare cohorts","results"]