From 9880baac5b42f8d8f8a2447d3d07b40e77b684f0 Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 19 May 2026 19:47:33 +0400 Subject: [PATCH] v2.2.1: Auto-install build tools (aapt2/ecj/d8/apksigner), dev tools banner with one-tap install --- README.md | 6 ++ android/app/build.gradle | 4 +- package.json | 2 +- www/css/styles.css | 45 ++++++++++ www/index.html | 12 ++- www/js/app.js | 173 ++++++++++++++++++++++++++++++++++----- 6 files changed, 217 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 1d29bb7..6d603c4 100644 --- a/README.md +++ b/README.md @@ -631,6 +631,12 @@ data: [DONE] ## Changelog +### v2.2.1 (2026-05-19) +- **Auto-Install Build Tools** — `aapt2`, `ecj`, `d8`, `apksigner` auto-installed via `pkg` with full paths and retry logic +- **Dev Tools Banner** — yellow warning banner on Coding/Agentic mode if tools missing, one-tap Install button +- **Bootstrap + Tools in One Tap** — Install button auto-installs Termux bootstrap then build tools sequentially +- Checks tool availability before every build attempt, auto-installs if missing + ### v2.2.0 (2026-05-19) - **Build Pipeline Rewrite** — proven 7-step pipeline tested with Android SDK 36: resources → link → compile (R.java + sources) → DEX → package → sign - **Auto-Install Build Tools** — `aapt2`, `ecj`, `d8`, `apksigner` auto-installed via `pkg` on first build diff --git a/android/app/build.gradle b/android/app/build.gradle index c34e88d..da94c29 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "ai.z.chat" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 13 - versionName "2.2.0" + versionCode 14 + versionName "2.2.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { ignoreAssetsPattern = '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~' diff --git a/package.json b/package.json index ed50b78..e10f0eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zai-chat", - "version": "2.2.0", + "version": "2.2.1", "description": "Z.AI Chat - Full stack AI chat powered by GLM Coding Plan", "main": "index.js", "scripts": { diff --git a/www/css/styles.css b/www/css/styles.css index 07e625d..edc4fd6 100644 --- a/www/css/styles.css +++ b/www/css/styles.css @@ -1107,6 +1107,51 @@ a:hover { text-decoration: underline; } -webkit-overflow-scrolling: touch; } +/* Dev Tools Banner */ +.dev-tools-banner { + display: flex; + align-items: center; + gap: 8px; + padding: 10px 14px; + margin: 8px 12px; + background: rgba(255, 165, 2, 0.1); + border: 1px solid var(--warning); + border-radius: var(--radius-sm); + font-size: 13px; + color: var(--text-primary); + animation: fadeIn 0.3s ease; +} +.dtb-icon { + font-size: 16px; + flex-shrink: 0; +} +.dtb-msg { + flex: 1; + line-height: 1.4; +} +.dtb-install-btn { + background: var(--accent); + color: white; + border: none; + padding: 6px 14px; + border-radius: 6px; + font-size: 12px; + font-weight: 700; + cursor: pointer; + flex-shrink: 0; + white-space: nowrap; +} +.dtb-install-btn:disabled { opacity: 0.6; cursor: not-allowed; } +.dtb-dismiss-btn { + background: none; + border: none; + color: var(--text-muted); + font-size: 18px; + cursor: pointer; + padding: 0 4px; + flex-shrink: 0; +} + /* Responsive */ @media (max-width: 480px) { .message { max-width: 92%; } diff --git a/www/index.html b/www/index.html index f7d0ad5..4a3f8c9 100644 --- a/www/index.html +++ b/www/index.html @@ -327,13 +327,23 @@

About

-

Z.AI Chat v2.2.0

+

Z.AI Chat v2.2.1

Built with Z.AI SDK & GLM-5.1

Compatible with Android 15/16

Changelog