Android Gradle
/Android Gradle
Naprawia buildy Gradle na telefonie: zgodność AGP i Gradle, SDK, pamięć, daemon i tryb offline.
- Autor
- a2heng ↗
- Repozytorium
- android-dev-in-android ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 12.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 12.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Naprawia buildy Gradle na telefonie: zgodność AGP i Gradle, SDK, pamięć, daemon i tryb offline.
Oryginalny opis (EN)
Fix Android Gradle builds on the phone: AGP/Gradle compatibility, SDK/build-tools, memory, daemon, offline mode and common error messages. Use when configuration or plugin resolution fails.
Jak działa
- Bundled versions
- Compatibility
- Memory
- Common errors
- Debug a build
- Rules
Podgląd SKILL.md
--- name: Android Gradle description: Fix Android Gradle builds on the phone: AGP/Gradle compatibility, SDK/build-tools, memory, daemon, offline mode and common error messages. Use when configuration or plugin resolution fails. --- # Android Gradle ## Bundled versions | Component | Version | |---|---| | Gradle | 9.9.0 | | AGP | 9.5.1 (this app); projects may use 8.13 or 9.x | | compileSdk | 35 | | build-tools | 36.0.0 (binarios 35.0.2 reetiquetados) | | JDK | 21 (Termux) | | Java source/target | 17 | The build skill launches `GradleMain` directly, because `bin/gradle` breaks under Android mksh (`Could not find or load main class "-Xmx64m"`). ## Compatibility - AGP 9.5.x needs Gradle 9.x and JDK 17+; this bundle uses Gradle 9.9.0 successfully. - AGP 9.x may need Gradle 9.x and newer build-tools; do not assume it works. - If a project pins an older Gradle via its wrapper, set `OC_USE_WRAPPER=1` and ensure the distribution is available, or upgrade the project to AGP 9.5.1. ## Memory ```properties org.gradle.jvmargs=-Xmx3g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8 org.gradle.daemon=false org.gradle.offline=true ``` If the phone has 6 GB RAM or less, use `-Xmx2g`. A killed Gradle daemon often looks like a random build failure. ## Common errors | Error | Fix | |---|---| | `Failed to find Build Tools revision 34.0.0` | init script forces 36.0.0; add `buildToolsVersion '36.0.0'` to the module | | `core-lambda-stubs.jar` missing | use toolchain v5+; the jar is bundled | | `aapt2` format/exec error | use the 16 KB aarch64 aapt2; check ABI | | `java.io.tmpdir ... doesn't exist` | let `build.sh` use `$HOME/.cache/tmp`; do not create `$PREFIX/tmp` by hand | | `Could not resolve ...` | dependency not in offline cache; use `android-lib-cache`, not a raw online run | | `checkDebugAarMetadata` / AndroidX warning | add `android.useAndroidX=true` to `gradle.properties` | | duplicate `kotlin-stdlib` classes | force one stdlib version (1.8+ merges jdk7/jdk8) | | `Unsupported class file major version` | JDK too new/old for the AGP/Kotlin version | | `SDK location not found` | `local.properties` or `ANDROID_HOME` missing | ## Debug a build ```sh bash ~/.config/opencode/skills/android-build/scripts/build.sh . debug ``` For more detail, run the same Gradle command with `--stacktrace --info` (edit a copy of build.sh or invoke GradleMain directly). Read the **first** error, not the last "BUILD FAILED". ## Rules - Do not edit the bundled Gradle distribution. - Do not commit `local.properties`, `.gradle/` or `build/`. - Keep `android.aapt2FromMavenOverride` pointing at the bundled aapt2.
Wersje
W bazie nie ma innych skilli o nazwie Android Gradle.
Migawka bazy z 13.11.2026 · wersja paczki 0045b964345b (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 90Android Project
Tworzy lub naprawia projekt Gradle Android na telefonie: moduły, wersje AGP, manifest, nazwę pakietu i pierwszy build. - 100android-agp-upgrade
Migruje projekt Android do wtyczki Android Gradle Plugin 9, aktualizując pliki budowania Gradle i przechodząc na wbudowany Kotlin. - 90kotlin-android
Buduje i aktualizuje natywne aplikacje Android w Kotlinie z Compose lub View, dbając o zgodność z Gradle, AGP i SDK. - 100agp-9-upgrade
Aktualizuje lub migruje projekt Android do Android Gradle Plugin w wersji 9, z wyłączeniem projektów Kotlin Multiplatform. - 90Android Build
Buduje, podpisuje i znajduje pliki APK na telefonie z Gradle, JDK 21 i zestawem Android SDK. - 100gradle-build-performance
Debuguje i optymalizuje wydajność buildów Android i Gradle: wolne buildy, wydajność CI/CD, analiza build scanów i wąskie gardła kompilacji.