6.6.3 - Alpha - 修复代码编辑器空行方框字符问题

This commit is contained in:
SuperMonster003
2025-04-17 18:16:31 +08:00
parent 45e2cb48f3
commit bd16b3590c
27 changed files with 238 additions and 305 deletions

View File

@@ -1,9 +1,10 @@
{ {
"$data": { "$data": {
"v6.6.3": { "v6.6.3": {
"released_date": "2025/04/16", "released_date": "2025/04/17",
"fix": [ "fix": [
"主页文档标签显示在线文档时部分内容被系统导航栏遮挡的问题" "主页文档标签显示在线文档时部分内容被系统导航栏遮挡的问题",
"部分设备代码编辑器空行显示方框字符的问题"
] ]
}, },
"v6.6.2": { "v6.6.2": {

View File

@@ -388,7 +388,7 @@ SDK Tools (أدوات SDK) (في النافذة اليمنى)
يعتمد مشروع AutoJs6 على إصدار `JDK (مجموعة تطوير جافا)` بإصدار لا يقل عن `17`، ولكن يفضل الإصدار الذي لا يقل عن `19`. يعتمد مشروع AutoJs6 على إصدار `JDK (مجموعة تطوير جافا)` بإصدار لا يقل عن `17`، ولكن يفضل الإصدار الذي لا يقل عن `19`.
اعتبارًا من 16 April 2025، الإصدار الأقصى المدعوم من JDK لمشروع AutoJs6 هو `24`. اعتبارًا من 17 April 2025، الإصدار الأقصى المدعوم من JDK لمشروع AutoJs6 هو `24`.
> ملاحظة: إذا كان نظام الكمبيوتر يحتوي على JDK والإصدار يفي بالمتطلبات المذكورة أعلاه، فيمكنك تخطي هذا القسم. > ملاحظة: إذا كان نظام الكمبيوتر يحتوي على JDK والإصدار يفي بالمتطلبات المذكورة أعلاه، فيمكنك تخطي هذا القسم.
@@ -476,7 +476,7 @@ Gradle
هذا يشير إلى أن ملف النموذج غير موجود. يجب تشغيل مهمة `inrt:assemble` يدويًا لإنشاء ملف النموذج، ثم إعادة البناء والنشر مرة أخرى. هذا يشير إلى أن ملف النموذج غير موجود. يجب تشغيل مهمة `inrt:assemble` يدويًا لإنشاء ملف النموذج، ثم إعادة البناء والنشر مرة أخرى.
> ملحوظة: ملف النموذج مفقود؛ قم بتشغيل مهمة `inrt:assemble` يدويًا لإنشائه قبل إعادة البناء والنشر مرة أخرى > ملحوظة: عند حدوث تغييرات في كود المشروع الرئيسي ورغبتك في مزامنة هذه التغييرات مع التطبيق المعبأ، يتعين عليك إعادة تشغيل مهمة `inrt:assemble` لتوليد ملفات القالب وإعادة نشر التطبيق
- AutoJs6 [app:bundle] - AutoJs6 [app:bundle]

View File

@@ -388,7 +388,7 @@ Check `Show Package Details`, click NDK and CMake respectively to ensure the cor
The `JDK (Java Development Kit)` version required for the AutoJs6 project should be at least `17`, but `19` or higher is recommended. The `JDK (Java Development Kit)` version required for the AutoJs6 project should be at least `17`, but `19` or higher is recommended.
As of Apr 16 , 2025, AutoJs6 supports up to version `24` of the JDK. As of Apr 17 , 2025, AutoJs6 supports up to version `24` of the JDK.
> Note: If the JDK is already installed on the computer system and the version meets the above requirements, this section can be skipped. > Note: If the JDK is already installed on the computer system and the version meets the above requirements, this section can be skipped.
@@ -476,7 +476,7 @@ When using the packaging feature, you might encounter the following error messag
This indicates that the template file does not exist. You need to manually run the `inrt:assemble` task to generate the template file, then rebuild and redeploy the app. This indicates that the template file does not exist. You need to manually run the `inrt:assemble` task to generate the template file, then rebuild and redeploy the app.
> Note: The template file is missing; run the `inrt:assemble` task manually to generate it before rebuilding and redeploying the app > Note: When the main project code changes and you want to synchronize these changes with the packaged app, you need to rerun the `inrt:assemble` task to generate the template files and redeploy the app
- AutoJs6 [app:bundle] - AutoJs6 [app:bundle]

View File

@@ -388,7 +388,7 @@ Marca `Show Package Details (Mostrar detalles del paquete)`, haz clic en NDK y C
La versión mínima requerida del `JDK (Kit de Desarrollo de Java)` para el proyecto AutoJs6 es `17`, pero se recomienda usar una versión no inferior a `19`. La versión mínima requerida del `JDK (Kit de Desarrollo de Java)` para el proyecto AutoJs6 es `17`, pero se recomienda usar una versión no inferior a `19`.
Hasta el 16 de April de 2025, AutoJs6 soporta hasta la versión `24` de JDK. Hasta el 17 de April de 2025, AutoJs6 soporta hasta la versión `24` de JDK.
> Nota: Si el sistema ya tiene instalado JDK y cumple con los requisitos anteriores, puedes omitir esta sección. > Nota: Si el sistema ya tiene instalado JDK y cumple con los requisitos anteriores, puedes omitir esta sección.
@@ -431,7 +431,7 @@ If the build couldn't proceed automatically or you need to rebuild the project,
If the build fails, you can report the error message to the AutoJs6 project's [Issues](http://issues.autojs6.com) page.. If the build fails, you can report the error message to the AutoJs6 project's [Issues](http://issues.autojs6.com) page..
> Note: For more details on building and running the app, please refer to [Android Docs](https://developer.android.com/studio/run?hl=en). > Nota: For more details on building and running the app, please refer to [Android Docs](https://developer.android.com/studio/run?hl=en).
#### AutoJs6 Project Deployment (Run App) #### AutoJs6 Project Deployment (Run App)
@@ -456,7 +456,7 @@ Package the project and generate an APK file that can be installed on Android de
- Prepara el archivo de firma (crear o seleccionar uno nuevo) para generar un paquete de instalación de versión de lanzamiento firmado - Prepara el archivo de firma (crear o seleccionar uno nuevo) para generar un paquete de instalación de versión de lanzamiento firmado
- Ruta de ejemplo: `"D:\AutoJs6\app\release\"` - Ruta de ejemplo: `"D:\AutoJs6\app\release\"`
> Note: For more information on building an app for user release, please refer to [Android Docs](https://developer.android.com/build/build-for-release?hl=en). > Nota: For more information on building an app for user release, please refer to [Android Docs](https://developer.android.com/build/build-for-release?hl=en).
#### Predefined Gradle Build Tasks for AutoJs6 #### Predefined Gradle Build Tasks for AutoJs6
@@ -476,7 +476,7 @@ When using the packaging feature, you might encounter the following error messag
This indicates that the template file does not exist. You need to manually run the `inrt:assemble` task to generate the template file, then rebuild and redeploy the app.. This indicates that the template file does not exist. You need to manually run the `inrt:assemble` task to generate the template file, then rebuild and redeploy the app..
> Note: The template file is missing; run the `inrt:assemble` task manually to generate it before rebuilding and redeploying the app. > Nota: Si el código del proyecto principal cambia y se desea sincronizar dichos cambios con la aplicación empaquetada, es necesario volver a ejecutar la tarea `inrt:assemble` para generar los archivos de plantilla y redeplegar la aplicación
- AutoJs6 [app:bundle] - AutoJs6 [app:bundle]

View File

@@ -388,7 +388,7 @@ Cochez `Show Package Details (afficher les détails du package)`, puis cliquez r
La version de JDK (Kit de développement Java) requise pour le projet AutoJs6 doit être au moins `17`, mais il est recommandé d'avoir au moins `19`. La version de JDK (Kit de développement Java) requise pour le projet AutoJs6 doit être au moins `17`, mais il est recommandé d'avoir au moins `19`.
À partir du 16 April 2025, AutoJs6 prend en charge la version maximale de JDK `24`. À partir du 17 April 2025, AutoJs6 prend en charge la version maximale de JDK `24`.
> Note : Si le JDK est déjà installé sur le système informatique et que la version répond aux exigences ci-dessus, vous pouvez ignorer cette section. > Note : Si le JDK est déjà installé sur le système informatique et que la version répond aux exigences ci-dessus, vous pouvez ignorer cette section.
@@ -476,7 +476,7 @@ Lors de l'utilisation de la fonction de packaging, vous pourriez rencontrer le m
Cela indique que le fichier modèle n'existe pas. Vous devez exécuter manuellement la tâche `inrt:assemble` pour générer le fichier modèle, puis reconstruire et redéployer l'application. Cela indique que le fichier modèle n'existe pas. Vous devez exécuter manuellement la tâche `inrt:assemble` pour générer le fichier modèle, puis reconstruire et redéployer l'application.
> Note : Le fichier modèle est manquant ; exécutez manuellement la tâche `inrt:assemble` pour le générer avant de reconstruire et redéployer l'application > Note : Lorsque le code du projet principal est modifié et que vous souhaitez synchroniser ces changements avec l'application packagée, il est nécessaire de relancer la tâche `inrt:assemble` afin de générer les fichiers de modèle et de redéployer l'application
- AutoJs6 [app:bundle] - AutoJs6 [app:bundle]

View File

@@ -388,7 +388,7 @@ SDK Tools (SDK ツール) (右側のウィンドウにあります)
AutoJs6プロジェクトが依存する `JDK (Java開発キット)` のリリースバージョンは少なくとも `17` で, それ以下のバージョンは推奨されませんが, 最低でも `19` の使用を推奨します. AutoJs6プロジェクトが依存する `JDK (Java開発キット)` のリリースバージョンは少なくとも `17` で, それ以下のバージョンは推奨されませんが, 最低でも `19` の使用を推奨します.
2025 年 4 月 16 日 現在, AutoJs6がサポートする最大のJDKバージョンは `24` です. 2025 年 4 月 17 日 現在, AutoJs6がサポートする最大のJDKバージョンは `24` です.
> 注: コンピュータシステムに適切なバージョンのJDKがインストールされている場合, この節の内容をスキップできます. > 注: コンピュータシステムに適切なバージョンのJDKがインストールされている場合, この節の内容をスキップできます.
@@ -476,7 +476,7 @@ AutoJs6 プロジェクトにはさまざまなビルドバリアントがあり
これはテンプレートファイルが存在しないことを示しています. テンプレートファイルを生成するために, 手動で `inrt:assemble` タスクを実行し, その後に再度ビルドしてデプロイしてください. これはテンプレートファイルが存在しないことを示しています. テンプレートファイルを生成するために, 手動で `inrt:assemble` タスクを実行し, その後に再度ビルドしてデプロイしてください.
> 注: テンプレートファイルが存在しません. `inrt:assemble` タスクを手動で実行してテンプレートファイルを生成し, その後に再度ビルドしてデプロイしてください > 注: メインプロジェクトのコードに変更があり, パッケージ化されたアプリに変更を反映させたい場合は, `inrt:assemble` タスクを実行してテンプレートファイルを生成し, アプリを再デプロイする必要があります
- AutoJs6 [app:bundle] - AutoJs6 [app:bundle]

View File

@@ -388,7 +388,7 @@ SDK Tools (SDK 도구) (오른쪽 창에 위치)
AutoJs6 프로젝트는 `JDK (Java 개발 도구 키트)` 버전이 `17` 이상이어야 하지만, `19` 이상을 권장합니다. AutoJs6 프로젝트는 `JDK (Java 개발 도구 키트)` 버전이 `17` 이상이어야 하지만, `19` 이상을 권장합니다.
2025 년 4 월 16 일 기준으로, AutoJs6이 지원하는 최대 JDK 버전은 `24`입니다. 2025 년 4 월 17 일 기준으로, AutoJs6이 지원하는 최대 JDK 버전은 `24`입니다.
> 메모: 시스템에 JDK가 설치되어 있고, 버전이 위의 요구 사항을 충족하는 경우, 이 섹션을 건너뛸 수 있습니다. > 메모: 시스템에 JDK가 설치되어 있고, 버전이 위의 요구 사항을 충족하는 경우, 이 섹션을 건너뛸 수 있습니다.
@@ -476,7 +476,7 @@ AutoJs6 프로젝트에는 다양한 빌드 변형이 있습니다. 그 중 "inr
이는 템플릿 파일이 존재하지 않음을 나타냅니다. 템플릿 파일을 생성하기 위해 `inrt:assemble` 작업을 수동으로 실행한 후, 앱을 다시 빌드하고 배포하십시오. 이는 템플릿 파일이 존재하지 않음을 나타냅니다. 템플릿 파일을 생성하기 위해 `inrt:assemble` 작업을 수동으로 실행한 후, 앱을 다시 빌드하고 배포하십시오.
> 참고: 템플릿 파일이 없으므로, 이를 생성하기 위해 `inrt:assemble` 작업을 수동으로 실행한 후 앱을 다시 빌드하고 배포하십시오 > 참고: 메인 프로젝트 코드에 변경이 발생하고, 패키징된 앱에 해당 변경 사항을 동기화하려면 `inrt:assemble` 작업을 다시 실행하여 템플릿 파일을 생성한 후 앱을 재배포해야 합니다
- AutoJs6 [app:bundle] - AutoJs6 [app:bundle]

View File

@@ -388,7 +388,7 @@ SDK Tools (SDK Инструменты) (находится в правом ок
Для проекта AutoJs6 требуется версия `JDK (Java Development Kit)` не ниже `17`, но рекомендуется не ниже `19`. Для проекта AutoJs6 требуется версия `JDK (Java Development Kit)` не ниже `17`, но рекомендуется не ниже `19`.
По состоянию на 16 April 2025 г. AutoJs6 поддерживает JDK максимальной версии `24`. По состоянию на 17 April 2025 г. AutoJs6 поддерживает JDK максимальной версии `24`.
> Примечание: Если на компьютере уже установлен JDK и версия соответствует указанным требованиям, этот раздел можно пропустить. > Примечание: Если на компьютере уже установлен JDK и версия соответствует указанным требованиям, этот раздел можно пропустить.
@@ -476,7 +476,7 @@ Gradle
Это указывает на то, что шаблонный файл отсутствует. Вы должны вручную запустить задачу `inrt:assemble`, чтобы создать шаблонный файл, а затем пересобрать и повторно развернуть приложение. Это указывает на то, что шаблонный файл отсутствует. Вы должны вручную запустить задачу `inrt:assemble`, чтобы создать шаблонный файл, а затем пересобрать и повторно развернуть приложение.
> Примечание: Шаблонный файл отсутствует; выполните вручную задачу `inrt:assemble`, чтобы создать его, прежде чем пересобирать и развертывать приложение > Примечание: Если изменяется код основного проекта и необходимо синхронизировать эти изменения с упакованным приложением, требуется повторно запустить задачу `inrt:assemble` для генерации шаблонных файлов и повторного развёртывания приложения
- AutoJs6 [app:bundle] - AutoJs6 [app:bundle]

View File

@@ -155,6 +155,13 @@ AutoJs6 在 Auto.js 最终项目的基础上, 于 `2021/12/01` 进行二次开
****** ******
# v6.6.3
###### 2025/04/16
* `修复` 主页文档标签显示在线文档时部分内容被系统导航栏遮挡的问题
* `优化` 部分依赖或本地库版本调整 _[`CHANGELOG.md`](http://project.autojs6.com/blob/master/app/src/main/assets-app/doc/CHANGELOG.md#v663)_
# v6.6.2 # v6.6.2
###### 2025/04/16 ###### 2025/04/16
@@ -233,96 +240,6 @@ AutoJs6 在 Auto.js 最终项目的基础上, 于 `2021/12/01` 进行二次开
* `优化` 同步最新的 Rhino 引擎官方上游代码并进行必要的代码适配 * `优化` 同步最新的 Rhino 引擎官方上游代码并进行必要的代码适配
* `优化` 部分依赖或本地库版本调整 _[`CHANGELOG.md`](http://project.autojs6.com/blob/master/app/src/main/assets-app/doc/CHANGELOG.md#v661)_ * `优化` 部分依赖或本地库版本调整 _[`CHANGELOG.md`](http://project.autojs6.com/blob/master/app/src/main/assets-app/doc/CHANGELOG.md#v661)_
# v6.6.0
###### 2024/12/02 - 内置模块重写, 谨慎升级
* `提示` 内置模块使用 Kotlin 重新编写以提升脚本运行效率但可能需要多次迭代逐步完善
* `提示` 内置 init.js 文件默认为空但支持开发者自行扩展内置模块或挂载外部模块
* `新增` axios 模块 / cheerio 模块 (Ref to [AutoX](https://github.com/kkevsekk1/AutoX))
* `新增` sqlite 模块, 用于 SQLite 数据库简单操作 (Ref to [Auto.js Pro](https://g.pro.autojs.org/)) (参阅 项目文档 > [SQLite](https://docs.autojs6.com/#/sqlite))
* `新增` mime 模块, 用于处理和解析 MIME 类型字符串 (参阅 项目文档 > [MIME](https://docs.autojs6.com/#/mime))
* `新增` nanoid 模块, 可作为字符串 ID 生成器 (Ref to [ai/nanoid](https://github.com/ai/nanoid))
* `新增` sysprops 模块, 用于获取运行时环境配置数据 (参阅 项目文档 > [系统属性](https://docs.autojs6.com/#/sysprops))
* `新增` ocr 模块支持 [Rapid OCR](https://github.com/RapidAI/RapidOCR) 引擎
* `新增` 布局分析支持切换窗口 (Ref to [Auto.js Pro](https://g.pro.autojs.org/))
* `新增` auto.clearCache 方法, 支持清除控件缓存 (Ref to [Auto.js Pro](https://g.pro.autojs.org/))
* `新增` threads.pool 方法, 支持线程池简单应用 (Ref to [Auto.js Pro](https://g.pro.autojs.org/))
* `新增` images.matchTemplate 方法增加 useTransparentMask 选项参数, 支持透明找图 (Ref to [Auto.js Pro](https://g.pro.autojs.org/))
* `新增` images.requestScreenCaptureAsync 方法, 用于 UI 模式异步方式申请截图权限 (Ref to [Auto.js Pro](https://g.pro.autojs.org/))
* `新增` images.requestScreenCapture 方法增加 isAsync 选项参数, 支持异步方式获取屏幕截图 (Ref to [Auto.js Pro](https://g.pro.autojs.org/))
* `新增` images.on('screen_capture', callback) 等事件监听方法, 支持监听屏幕截图可用事件 (Ref to [Auto.js Pro](https://g.pro.autojs.org/))
* `新增` images.stopScreenCapture 方法, 支持主动释放截图申请的相关资源 (Ref to [Auto.js Pro](https://g.pro.autojs.org/))
* `新增` images.psnr/mse/ssim/mssim/hist/ncc 及 images.getSimilarity 方法, 用于获取图像相似性度量值
* `新增` images.isGrayscale 方法, 用于判断图像是否为灰度图像
* `新增` images.invert 方法, 用于反色图像转换
* `新增` s13n.point/time 方法, 用于标准化点对象及时长对象 (参阅 项目文档 > [标准化](https://docs.autojs6.com/#/s13n))
* `新增` console 模块 gravity (重力), touchThrough (穿透点击), backgroundTint (背景着色) 等相关方法 (参阅 项目文档 > [控制台](https://docs.autojs6.com/#/console))
* `新增` Mathx.randomInt/Mathx.randomFloat 方法, 用于返回指定范围内的随机整数或随机浮点数
* `新增` app.launchDual/startDualActivity 等方法, 用于处理双开应用 (需要 Shizuku 或 Root 权限) (实验性)
* `新增` app.kill 方法, 用于强制停止应用 (需要 Shizuku 或 Root 权限)
* `新增` floaty.getClip 方法, 用于借助浮动窗口聚焦间接获取剪切板内容
* `修复` Fragment 子类 (如 [DrawerFragment](https://github.com/SuperMonster003/AutoJs6/blob/17616504ab0bba93b30ab7abc67108ee5253f39a/app/src/main/java/org/autojs/autojs/ui/main/drawer/DrawerFragment.kt#L369) / [ExplorerFragment](https://github.com/SuperMonster003/AutoJs6/blob/17616504ab0bba93b30ab7abc67108ee5253f39a/app/src/main/java/org/autojs/autojs/ui/main/scripts/ExplorerFragment.kt#L48) 等) 中存在的 View Binding 内存泄漏
* `修复` [ScreenCapture](https://github.com/SuperMonster003/AutoJs6/blob/17616504ab0bba93b30ab7abc67108ee5253f39a/app/src/main/java/org/autojs/autojs/core/image/capture/ScreenCapturer.java#L70) / [ThemeColorPreference](https://github.com/SuperMonster003/AutoJs6/blob/10960ddbee71f75ef80907ad5b6ab42f3e1bf31e/app/src/main/java/org/autojs/autojs/ui/settings/ThemeColorPreference.kt#L21) 等类中存在的实例内存泄漏
* `修复` Android 14 申请截图权限导致应用崩溃的问题 (by [chenguangming](https://github.com/chenguangming)) _[`pr #242`](http://pr.autojs6.com/242)_
* `修复` Android 14 开启前台服务导致应用崩溃的问题
* `修复` Android 14 代码编辑器运行按钮点击后无法正常亮起的问题
* `修复` 项目打包后应用可能因缺少必要库文件无法正常运行的问题 _[`issue #202`](http://issues.autojs6.com/202)_ _[`issue #223`](http://issues.autojs6.com/223)_ _[`pr #264`](http://pr.autojs6.com/264)_
* `修复` 编辑项目时可能因指定图标资源不存在而导致应用崩溃的问题 _[`issue #203`](http://issues.autojs6.com/203)_
* `修复` 截图权限申请时无法正常使用参数获取指定屏幕方向的截图资源
* `修复` 部分设备无法正常添加脚本快捷方式的问题 (试修) _[`issue #221`](http://issues.autojs6.com/221)_
* `修复` 调用 http 模块与发送请求相关的方法将出现累积性请求发送延迟的问题 _[`issue #192`](http://issues.autojs6.com/192)_
* `修复` Shizuku 服务在 AutoJs6 进入主活动页面之前可能无法正常使用的问题 (试修) _[`issue #255`](http://issues.autojs6.com/255)_
* `修复` random(min, max) 方法可能出现结果越界的问题
* `修复` pickup 方法结果类型参数无法正常传入空数组的问题
* `修复` UiObject#bounds() 得到的控件矩形可能被意外修改而破坏其不变性的问题
* `修复` text/button/input 元素的文本内容包含半角双引号时无法正常解析的问题
* `修复` text/textswitcher 元素的 autoLink 属性功能失效的问题
* `修复` 不同脚本可能错误地共享同一个 ScriptRuntime 对象的问题
* `修复` 全局变量 HEIGHT 及 WIDTH 丢失 getter 动态属性的问题
* `修复` 脚本启动时 RootShell 随即加载可能导致启动高延迟的问题
* `修复` 控制台浮动窗口设置背景颜色导致矩形圆角样式丢失的问题
* `修复` 无障碍服务自动启动可能出现的服务异常问题 (试修)
* `修复` 主页文档页面左右滑动 WebView 控件时可能触发 ViewPager 切换的问题
* `修复` 文件管理器无法识别包含大写字母文件扩展名的问题
* `修复` 文件管理器首次进入项目目录时可能无法自动识别项目的问题
* `修复` 文件管理器删除文件夹后页面无法自动刷新的问题
* `修复` 文件管理器排序文件及文件夹时可能出现 ASCII 首字母名称置后的问题
* `修复` 代码编辑器调试功能的 FAILED ASSERTION 异常
* `修复` 代码编辑器调试过程中关闭编辑器后无法再次正常调试的问题
* `修复` 代码编辑器跳转到行尾时可能遗漏末尾字符的问题
* `修复` 主活动页面启动日志活动页面时可能出现闪屏的问题
* `修复` 打包应用无法正常使用 opencc 模块的问题
* `优化` 打包页面中 "不可用 ABI" 控件的点击提示体验
* `优化` 支持使用 Shizuku 控制 "指针位置" 显示开关
* `优化` 支持使用 Shizuku 控制 "投影媒体" 及 "修改安全设置" 权限开关
* `优化` automator.gestureAsync/gesturesAsync 支持回调函数参数
* `优化` tasks 模块使用同步方式进行数据库操作避免可能的数据访问不一致问题
* `优化` 脚本执行模式支持管道符号分隔模式参数 (如 `"ui|auto";` 开头)
* `优化` 脚本执行模式支持单引号及反引号且支持省略分号 (如 `'ui';` 或 `'ui'` 开头)
* `优化` 脚本执行模式支持 axios, cheerio, dayjs 等模式参数快捷导入内置扩展模块 (如 `"axios";` 开头)
* `优化` 脚本执行模式支持 x 或 jsox 模式参数快捷启用 JavaScript 内置对象扩展模块 (如 `"x";` 开头)
* `优化` img 元素 src 及 path 属性支持本地相对路径 (如 `<img src="a.png"` />)
* `优化` 代码编辑器导入 Java 类和包名时支持智能判断插入位置
* `优化` images 模块支持直接使用路径作为图像参数
* `优化` importPackage 支持字符串参数
* `优化` 服务端模式 IP 地址支持剪切板导入智能识别且支持空格按键智能转换
* `优化` 文件管理器新建文件时支持默认前缀选择并自动生成合适的数字后缀
* `优化` 文件管理器运行项目时具体化异常消息提示 _[`issue #268`](http://issues.autojs6.com/268)_
* `优化` 文件管理器支持更多类型并支持显示对应的图标符号 (支持 800 多种文件类型)
* `优化` 文件管理器可编辑的文件类型 (jpg/doc/pdf...) 增加编辑按钮
* `优化` 文件管理器 APK 文件支持查看基础信息, Manifest 信息及权限列表
* `优化` 文件管理器音视频等媒体文件支持查看基础信息及 MediaInfo 信息
* `优化` 打包单文件时支持自动填入合适的标准化名包并支持无效字符过滤提示
* `优化` 打包单文件时支持根据已安装同包名应用自动设置图标并自增版本号及版本名称
* `优化` 打包项目配置文件支持 abis/libs 选项指定默认包含的 ABI 架构及扩展库
* `优化` 打包项目配置文件 abis/libs 选项无效或无可用时支持相关消息提示
* `优化` LeakCanary 在正式发行版本中被排除以避免增加不必要性
* `优化` 项目源代码所有英文注释增加简体中文翻译以增强注释可读性
* `优化` README 及 CHANGELOG 支持多语言 (由脚本自动生成)
* `优化` Gradle 构建脚本提升版本自适应能力
* `优化` 部分依赖或本地库版本调整 _[`CHANGELOG.md`](http://project.autojs6.com/blob/master/app/src/main/assets-app/doc/CHANGELOG.md#v660)_
##### 更多版本历史可参阅 ##### 更多版本历史可参阅
* [CHANGELOG.md](http://project.autojs6.com/blob/master/app/src/main/assets-app/doc/CHANGELOG-zh-Hans.md) * [CHANGELOG.md](http://project.autojs6.com/blob/master/app/src/main/assets-app/doc/CHANGELOG-zh-Hans.md)
@@ -388,7 +305,7 @@ SDK Tools (SDK 工具) (位于右侧窗口)
AutoJs6 项目依赖的 `JDK (Java 开发工具包)` 发行版本不低于 `17`, 但建议不低于 `19`. AutoJs6 项目依赖的 `JDK (Java 开发工具包)` 发行版本不低于 `17`, 但建议不低于 `19`.
截至 2025 年 4 月 16 日, AutoJs6 可支持 JDK 最高版本为 `24`. 截至 2025 年 4 月 17 日, AutoJs6 可支持 JDK 最高版本为 `24`.
> 注: 如果计算机系统已安装 JDK 且版本满足上述要求, 则可跳过此小节内容. > 注: 如果计算机系统已安装 JDK 且版本满足上述要求, 则可跳过此小节内容.
@@ -476,7 +393,7 @@ AutoJs6 项目拥有不同的构建变体, 其中 "inrt" 变体用于实现 Auto
这表明模板文件不存在, 需要手动运行一次 `inrt:assemble` 任务, 生成模板文件, 然后再次构建并部署 App. 这表明模板文件不存在, 需要手动运行一次 `inrt:assemble` 任务, 生成模板文件, 然后再次构建并部署 App.
> 这表明模板文件不存在, 需要手动运行一次 `inrt:assemble` 任务, 生成模板文件, 然后再次构建并部署 App > 注: 当主项目代码发生变更, 且希望将变更同步到打包应用时, 需要重新运行 `inrt:assemble` 任务生成模板文件并再次部署 App
- AutoJs6 [app:bundle] - AutoJs6 [app:bundle]

View File

@@ -388,7 +388,7 @@ SDK Tools (SDK 工具) (位於右側窗口)
AutoJs6 項目依賴的 `JDK (Java 開發工具包)` 發行版本不低於 `17`, 但建議不低於 `19`. AutoJs6 項目依賴的 `JDK (Java 開發工具包)` 發行版本不低於 `17`, 但建議不低於 `19`.
截至 2025 年 4 月 16 日, AutoJs6 可支持 JDK 最高版本為 `24`. 截至 2025 年 4 月 17 日, AutoJs6 可支持 JDK 最高版本為 `24`.
> 注: 如果計算機系統已安裝 JDK 且版本滿足上述要求, 則可跳過此小節內容. > 注: 如果計算機系統已安裝 JDK 且版本滿足上述要求, 則可跳過此小節內容.
@@ -476,7 +476,7 @@ AutoJs6 項目擁有不同的構建變體, 其中 "inrt" 變體用於實現 Auto
這表明模板文件不存在, 需要手動運行一次 `inrt:assemble` 任務, 生成模板文件, 然後再次構建並部署 App. 這表明模板文件不存在, 需要手動運行一次 `inrt:assemble` 任務, 生成模板文件, 然後再次構建並部署 App.
> 這表明模板文件不存在, 需要手動運行一次 `inrt:assemble` 任務, 生成模板文件, 然後再次構建並部署 App > 注: 當主項目代碼發生變更, 且希望將變更同步到打包應用時, 需要重新運行 `inrt:assemble` 任務生成模板文件並再次部署 App
- AutoJs6 [app:bundle] - AutoJs6 [app:bundle]

View File

@@ -388,7 +388,7 @@ SDK Tools (SDK 工具) (位於右側視窗)
AutoJs6 專案依賴的 `JDK (Java 開發工具包)` 發行版本不低於 `17`, 但建議不低於 `19`. AutoJs6 專案依賴的 `JDK (Java 開發工具包)` 發行版本不低於 `17`, 但建議不低於 `19`.
截至 2025 年 4 月 16 日, AutoJs6 可支援 JDK 最高版本為 `24`. 截至 2025 年 4 月 17 日, AutoJs6 可支援 JDK 最高版本為 `24`.
> 注: 如果計算機系統已安裝 JDK 且版本滿足上述要求, 則可跳過此小節內容. > 注: 如果計算機系統已安裝 JDK 且版本滿足上述要求, 則可跳過此小節內容.
@@ -476,7 +476,7 @@ AutoJs6 專案擁有不同的構建變體, 其中 "inrt" 變體用於實現 Auto
這表明模板檔案不存在, 需要手動執行一次 `inrt:assemble` 任務, 生成模板檔案, 然後再次構建並部署 App. 這表明模板檔案不存在, 需要手動執行一次 `inrt:assemble` 任務, 生成模板檔案, 然後再次構建並部署 App.
> 這表明模板檔案不存在, 需要手動執行一次 `inrt:assemble` 任務, 生成模板檔案, 然後再次構建並部署 App > 注: 當主專案程式碼發生變更, 且希望將變更同步到打包應用時, 需要重新執行 `inrt:assemble` 任務生成模板檔案並再次部署 App
- AutoJs6 [app:bundle] - AutoJs6 [app:bundle]

View File

@@ -8,7 +8,7 @@
"bq_annotation_autojs6_project_cloning_retry_clone": "ملاحظة: قد تستغرق العملية المذكورة أعلاه وقتًا طويلًا. إذا كانت حالة الشبكة غير جيدة، قد تحتاج إلى المحاولة عدة مرات (بالنقر على زر Retry)", "bq_annotation_autojs6_project_cloning_retry_clone": "ملاحظة: قد تستغرق العملية المذكورة أعلاه وقتًا طويلًا. إذا كانت حالة الشبكة غير جيدة، قد تحتاج إلى المحاولة عدة مرات (بالنقر على زر Retry)",
"bq_annotation_autojs6_project_deploy_apk": "ملحوظة: لمزيد من المعلومات حول كيفية بناء التطبيق لإصداره للمستخدمين، يرجى الرجوع إلى [Android Docs](https://developer.android.com/build/build-for-release?hl=en)", "bq_annotation_autojs6_project_deploy_apk": "ملحوظة: لمزيد من المعلومات حول كيفية بناء التطبيق لإصداره للمستخدمين، يرجى الرجوع إلى [Android Docs](https://developer.android.com/build/build-for-release?hl=en)",
"bq_annotation_autojs6_resources_cloning_install_git_note": "ملاحظة: قد تتطلب العملية المذكورة أعلاه تثبيت [Git (نظام التحكم في الإصدار الموزع)](https://git-scm.com/download)", "bq_annotation_autojs6_resources_cloning_install_git_note": "ملاحظة: قد تتطلب العملية المذكورة أعلاه تثبيت [Git (نظام التحكم في الإصدار الموزع)](https://git-scm.com/download)",
"bq_annotation_gradle_task_inrt_rebuild_if_needed": "ملحوظة: ملف النموذج مفقود؛ قم بتشغيل مهمة `inrt:assemble` يدويًا لإنشائه قبل إعادة البناء والنشر مرة أخرى", "bq_annotation_gradle_task_inrt_rebuild_if_needed": "ملحوظة: عند حدوث تغييرات في كود المشروع الرئيسي ورغبتك في مزامنة هذه التغييرات مع التطبيق المعبأ، يتعين عليك إعادة تشغيل مهمة `inrt:assemble` لتوليد ملفات القالب وإعادة نشر التطبيق",
"bq_annotation_jdk_preparation_skip_if_jdk_installed": "ملاحظة: إذا كان نظام الكمبيوتر يحتوي على JDK والإصدار يفي بالمتطلبات المذكورة أعلاه، فيمكنك تخطي هذا القسم", "bq_annotation_jdk_preparation_skip_if_jdk_installed": "ملاحظة: إذا كان نظام الكمبيوتر يحتوي على JDK والإصدار يفي بالمتطلبات المذكورة أعلاه، فيمكنك تخطي هذا القسم",
"h3_contribution": "المشاركة بالإسهام", "h3_contribution": "المشاركة بالإسهام",
"h3_environment": "البيئة", "h3_environment": "البيئة",

View File

@@ -8,7 +8,7 @@
"bq_annotation_autojs6_project_cloning_retry_clone": "Note: The above process may take a long time. If network conditions are poor, it may need to be retried multiple times (click the Retry button)", "bq_annotation_autojs6_project_cloning_retry_clone": "Note: The above process may take a long time. If network conditions are poor, it may need to be retried multiple times (click the Retry button)",
"bq_annotation_autojs6_project_deploy_apk": "Note: For more information on building an app for user release, please refer to [Android Docs](https://developer.android.com/build/build-for-release?hl=en)", "bq_annotation_autojs6_project_deploy_apk": "Note: For more information on building an app for user release, please refer to [Android Docs](https://developer.android.com/build/build-for-release?hl=en)",
"bq_annotation_autojs6_resources_cloning_install_git_note": "Note: The above process may require the installation of [Git](https://git-scm.com/download)", "bq_annotation_autojs6_resources_cloning_install_git_note": "Note: The above process may require the installation of [Git](https://git-scm.com/download)",
"bq_annotation_gradle_task_inrt_rebuild_if_needed": "Note: The template file is missing; run the `inrt:assemble` task manually to generate it before rebuilding and redeploying the app", "bq_annotation_gradle_task_inrt_rebuild_if_needed": "Note: When the main project code changes and you want to synchronize these changes with the packaged app, you need to rerun the `inrt:assemble` task to generate the template files and redeploy the app",
"bq_annotation_jdk_preparation_skip_if_jdk_installed": "Note: If the JDK is already installed on the computer system and the version meets the above requirements, this section can be skipped", "bq_annotation_jdk_preparation_skip_if_jdk_installed": "Note: If the JDK is already installed on the computer system and the version meets the above requirements, this section can be skipped",
"h3_contribution": "Contribution", "h3_contribution": "Contribution",
"h3_environment": "Environment", "h3_environment": "Environment",

View File

@@ -4,11 +4,11 @@
"bq_annotation_android_sdk_preparation_skip_if_sdk_installed": "Nota: Si el sistema ya tiene instalado el SDK de Android (Kit de Desarrollo de Software de Android), puedes omitir esta sección", "bq_annotation_android_sdk_preparation_skip_if_sdk_installed": "Nota: Si el sistema ya tiene instalado el SDK de Android (Kit de Desarrollo de Software de Android), puedes omitir esta sección",
"bq_annotation_android_sdk_tools_preparation_skip_if_tools_installed": "Nota: Si el sistema ya tiene instaladas todas las herramientas necesarias del SDK de Android para AutoJs6, puedes omitir esta sección", "bq_annotation_android_sdk_tools_preparation_skip_if_tools_installed": "Nota: Si el sistema ya tiene instaladas todas las herramientas necesarias del SDK de Android para AutoJs6, puedes omitir esta sección",
"bq_annotation_android_studio_release_date_note": "Nota: La fecha de lanzamiento de la versión anterior es el {{ var_date_android_studio_latest_recommended_version_name }}. Para descargar otras versiones, o si los enlaces anteriores ya no funcionan, puedes visitar la página del [Archivo de versiones de Android Studio](https://developer.android.com/studio/archive?hl=en)", "bq_annotation_android_studio_release_date_note": "Nota: La fecha de lanzamiento de la versión anterior es el {{ var_date_android_studio_latest_recommended_version_name }}. Para descargar otras versiones, o si los enlaces anteriores ya no funcionan, puedes visitar la página del [Archivo de versiones de Android Studio](https://developer.android.com/studio/archive?hl=en)",
"bq_annotation_autojs6_project_building_reference": "Note: For more details on building and running the app, please refer to [Android Docs](https://developer.android.com/studio/run?hl=en).", "bq_annotation_autojs6_project_building_reference": "Nota: For more details on building and running the app, please refer to [Android Docs](https://developer.android.com/studio/run?hl=en).",
"bq_annotation_autojs6_project_cloning_retry_clone": "Nota: Este proceso puede ser muy largo. Si las condiciones de la red no son buenas, puede ser necesario reintentar varias veces (haga clic en el botón Retry)", "bq_annotation_autojs6_project_cloning_retry_clone": "Nota: Este proceso puede ser muy largo. Si las condiciones de la red no son buenas, puede ser necesario reintentar varias veces (haga clic en el botón Retry)",
"bq_annotation_autojs6_project_deploy_apk": "Note: For more information on building an app for user release, please refer to [Android Docs](https://developer.android.com/build/build-for-release?hl=en).", "bq_annotation_autojs6_project_deploy_apk": "Nota: For more information on building an app for user release, please refer to [Android Docs](https://developer.android.com/build/build-for-release?hl=en).",
"bq_annotation_autojs6_resources_cloning_install_git_note": "Nota: Este proceso puede requerir la instalación de [Git (sistema de control de versiones distribuido)](https://git-scm.com/download)", "bq_annotation_autojs6_resources_cloning_install_git_note": "Nota: Este proceso puede requerir la instalación de [Git (sistema de control de versiones distribuido)](https://git-scm.com/download)",
"bq_annotation_gradle_task_inrt_rebuild_if_needed": "Note: The template file is missing; run the `inrt:assemble` task manually to generate it before rebuilding and redeploying the app.", "bq_annotation_gradle_task_inrt_rebuild_if_needed": "Nota: Si el código del proyecto principal cambia y se desea sincronizar dichos cambios con la aplicación empaquetada, es necesario volver a ejecutar la tarea `inrt:assemble` para generar los archivos de plantilla y redeplegar la aplicación",
"bq_annotation_jdk_preparation_skip_if_jdk_installed": "Nota: Si el sistema ya tiene instalado JDK y cumple con los requisitos anteriores, puedes omitir esta sección", "bq_annotation_jdk_preparation_skip_if_jdk_installed": "Nota: Si el sistema ya tiene instalado JDK y cumple con los requisitos anteriores, puedes omitir esta sección",
"h3_contribution": "Contribución", "h3_contribution": "Contribución",
"h3_environment": "Entorno", "h3_environment": "Entorno",

View File

@@ -8,7 +8,7 @@
"bq_annotation_autojs6_project_cloning_retry_clone": "Note : Ce processus peut être très long. En cas de mauvaises conditions réseau, plusieurs tentatives peuvent être nécessaires (cliquez sur le bouton Retry)", "bq_annotation_autojs6_project_cloning_retry_clone": "Note : Ce processus peut être très long. En cas de mauvaises conditions réseau, plusieurs tentatives peuvent être nécessaires (cliquez sur le bouton Retry)",
"bq_annotation_autojs6_project_deploy_apk": "Note : Pour plus d'informations sur la manière de construire une application pour sa publication, veuillez consulter [Android Docs](https://developer.android.com/build/build-for-release?hl=en)", "bq_annotation_autojs6_project_deploy_apk": "Note : Pour plus d'informations sur la manière de construire une application pour sa publication, veuillez consulter [Android Docs](https://developer.android.com/build/build-for-release?hl=en)",
"bq_annotation_autojs6_resources_cloning_install_git_note": "Note : Ce processus peut nécessiter l'installation de [Git (système de gestion de versions distribué)](https://git-scm.com/download)", "bq_annotation_autojs6_resources_cloning_install_git_note": "Note : Ce processus peut nécessiter l'installation de [Git (système de gestion de versions distribué)](https://git-scm.com/download)",
"bq_annotation_gradle_task_inrt_rebuild_if_needed": "Note : Le fichier modèle est manquant ; exécutez manuellement la tâche `inrt:assemble` pour le générer avant de reconstruire et redéployer l'application", "bq_annotation_gradle_task_inrt_rebuild_if_needed": "Note : Lorsque le code du projet principal est modifié et que vous souhaitez synchroniser ces changements avec l'application packagée, il est nécessaire de relancer la tâche `inrt:assemble` afin de générer les fichiers de modèle et de redéployer l'application",
"bq_annotation_jdk_preparation_skip_if_jdk_installed": "Note : Si le JDK est déjà installé sur le système informatique et que la version répond aux exigences ci-dessus, vous pouvez ignorer cette section", "bq_annotation_jdk_preparation_skip_if_jdk_installed": "Note : Si le JDK est déjà installé sur le système informatique et que la version répond aux exigences ci-dessus, vous pouvez ignorer cette section",
"h3_contribution": "Contribution", "h3_contribution": "Contribution",
"h3_environment": "Environnement", "h3_environment": "Environnement",

View File

@@ -8,7 +8,7 @@
"bq_annotation_autojs6_project_cloning_retry_clone": "注: 上記のプロセスは非常に時間がかかる可能性があります. ネットワーク条件が悪い場合, 異なるボタンをクリックして再試行する必要がある場合があります", "bq_annotation_autojs6_project_cloning_retry_clone": "注: 上記のプロセスは非常に時間がかかる可能性があります. ネットワーク条件が悪い場合, 異なるボタンをクリックして再試行する必要がある場合があります",
"bq_annotation_autojs6_project_deploy_apk": "注: ユーザー向けにリリースするアプリのビルド方法の詳細については, [Android Docs](https://developer.android.com/build/build-for-release?hl=en) を参照してください", "bq_annotation_autojs6_project_deploy_apk": "注: ユーザー向けにリリースするアプリのビルド方法の詳細については, [Android Docs](https://developer.android.com/build/build-for-release?hl=en) を参照してください",
"bq_annotation_autojs6_resources_cloning_install_git_note": "注: 上記プロセスには[Git (バージョン管理システム)](https://git-scm.com/download)をインストールする必要がある場合があります", "bq_annotation_autojs6_resources_cloning_install_git_note": "注: 上記プロセスには[Git (バージョン管理システム)](https://git-scm.com/download)をインストールする必要がある場合があります",
"bq_annotation_gradle_task_inrt_rebuild_if_needed": "注: テンプレートファイルが存在しません. `inrt:assemble` タスクを手動で実行してテンプレートファイルを生成し, その後に再度ビルドしてデプロイしてください", "bq_annotation_gradle_task_inrt_rebuild_if_needed": "注: メインプロジェクトのコードに変更があり, パッケージ化されたアプリに変更を反映させたい場合は, `inrt:assemble` タスクを実行してテンプレートファイルを生成し, アプリを再デプロイする必要があります",
"bq_annotation_jdk_preparation_skip_if_jdk_installed": "注: コンピュータシステムに適切なバージョンのJDKがインストールされている場合, この節の内容をスキップできます", "bq_annotation_jdk_preparation_skip_if_jdk_installed": "注: コンピュータシステムに適切なバージョンのJDKがインストールされている場合, この節の内容をスキップできます",
"h3_contribution": "貢献の参加", "h3_contribution": "貢献の参加",
"h3_environment": "環境", "h3_environment": "環境",

View File

@@ -8,7 +8,7 @@
"bq_annotation_autojs6_project_cloning_retry_clone": "메모: 상기 과정은 시간이 많이 소요될 수 있습니다. 네트워크 상태가 좋지 않으면 여러 번 재시도해야 할 수 있습니다 (Retry 버튼을 클릭)", "bq_annotation_autojs6_project_cloning_retry_clone": "메모: 상기 과정은 시간이 많이 소요될 수 있습니다. 네트워크 상태가 좋지 않으면 여러 번 재시도해야 할 수 있습니다 (Retry 버튼을 클릭)",
"bq_annotation_autojs6_project_deploy_apk": "참고: 사용자에게 릴리스할 앱 빌드 방법에 대한 자세한 내용은 [Android Docs](https://developer.android.com/build/build-for-release?hl=en)를 참조하십시오", "bq_annotation_autojs6_project_deploy_apk": "참고: 사용자에게 릴리스할 앱 빌드 방법에 대한 자세한 내용은 [Android Docs](https://developer.android.com/build/build-for-release?hl=en)를 참조하십시오",
"bq_annotation_autojs6_resources_cloning_install_git_note": "메모: 과정 중 [Git (분산 버전 관리 시스템)](https://git-scm.com/download)을 설치해야 할 수도 있습니다", "bq_annotation_autojs6_resources_cloning_install_git_note": "메모: 과정 중 [Git (분산 버전 관리 시스템)](https://git-scm.com/download)을 설치해야 할 수도 있습니다",
"bq_annotation_gradle_task_inrt_rebuild_if_needed": "참고: 템플릿 파일이 없으므로, 이를 생성하기 위해 `inrt:assemble` 작업을 수동으로 실행한 후 앱을 다시 빌드하고 배포하십시오", "bq_annotation_gradle_task_inrt_rebuild_if_needed": "참고: 메인 프로젝트 코드에 변경이 발생하고, 패키징된 앱에 해당 변경 사항을 동기화하려면 `inrt:assemble` 작업을 다시 실행하여 템플릿 파일을 생성한 후 앱을 재배포해야 합니다",
"bq_annotation_jdk_preparation_skip_if_jdk_installed": "메모: 시스템에 JDK가 설치되어 있고, 버전이 위의 요구 사항을 충족하는 경우, 이 섹션을 건너뛸 수 있습니다", "bq_annotation_jdk_preparation_skip_if_jdk_installed": "메모: 시스템에 JDK가 설치되어 있고, 버전이 위의 요구 사항을 충족하는 경우, 이 섹션을 건너뛸 수 있습니다",
"h3_contribution": "기여 참여", "h3_contribution": "기여 참여",
"h3_environment": "환경", "h3_environment": "환경",

View File

@@ -8,7 +8,7 @@
"bq_annotation_autojs6_project_cloning_retry_clone": "Примечание: Процесс может занять много времени. При плохом состоянии сети возможно потребуется несколько попыток (нажмите кнопку Retry)", "bq_annotation_autojs6_project_cloning_retry_clone": "Примечание: Процесс может занять много времени. При плохом состоянии сети возможно потребуется несколько попыток (нажмите кнопку Retry)",
"bq_annotation_autojs6_project_deploy_apk": "Примечание: Для получения дополнительной информации о том, как собрать приложение для выпуска, смотрите [Android Docs](https://developer.android.com/build/build-for-release?hl=en)", "bq_annotation_autojs6_project_deploy_apk": "Примечание: Для получения дополнительной информации о том, как собрать приложение для выпуска, смотрите [Android Docs](https://developer.android.com/build/build-for-release?hl=en)",
"bq_annotation_autojs6_resources_cloning_install_git_note": "Примечание: В процессе может потребоваться установка [Git (система управления версиями)](https://git-scm.com/download)", "bq_annotation_autojs6_resources_cloning_install_git_note": "Примечание: В процессе может потребоваться установка [Git (система управления версиями)](https://git-scm.com/download)",
"bq_annotation_gradle_task_inrt_rebuild_if_needed": "Примечание: Шаблонный файл отсутствует; выполните вручную задачу `inrt:assemble`, чтобы создать его, прежде чем пересобирать и развертывать приложение", "bq_annotation_gradle_task_inrt_rebuild_if_needed": "Примечание: Если изменяется код основного проекта и необходимо синхронизировать эти изменения с упакованным приложением, требуется повторно запустить задачу `inrt:assemble` для генерации шаблонных файлов и повторного развёртывания приложения",
"bq_annotation_jdk_preparation_skip_if_jdk_installed": "Примечание: Если на компьютере уже установлен JDK и версия соответствует указанным требованиям, этот раздел можно пропустить", "bq_annotation_jdk_preparation_skip_if_jdk_installed": "Примечание: Если на компьютере уже установлен JDK и версия соответствует указанным требованиям, этот раздел можно пропустить",
"h3_contribution": "Вклад участников", "h3_contribution": "Вклад участников",
"h3_environment": "Окружение", "h3_environment": "Окружение",

View File

@@ -8,7 +8,7 @@
"bq_annotation_autojs6_project_cloning_retry_clone": "注: 上述过程可能非常耗时. 若网络条件欠佳, 可能需要重试多次 (点击 Retry 按钮)", "bq_annotation_autojs6_project_cloning_retry_clone": "注: 上述过程可能非常耗时. 若网络条件欠佳, 可能需要重试多次 (点击 Retry 按钮)",
"bq_annotation_autojs6_project_deploy_apk": "注: 关于如何构建应用以向用户发布的更多内容, 可参阅 [Android Docs](https://developer.android.com/build/build-for-release?hl=zh-cn)", "bq_annotation_autojs6_project_deploy_apk": "注: 关于如何构建应用以向用户发布的更多内容, 可参阅 [Android Docs](https://developer.android.com/build/build-for-release?hl=zh-cn)",
"bq_annotation_autojs6_resources_cloning_install_git_note": "注: 上述过程可能需要安装 [Git (分布式版本控制系统)](https://git-scm.com/download)", "bq_annotation_autojs6_resources_cloning_install_git_note": "注: 上述过程可能需要安装 [Git (分布式版本控制系统)](https://git-scm.com/download)",
"bq_annotation_gradle_task_inrt_rebuild_if_needed": "这表明模板文件不存在, 需要手动运行一次 `inrt:assemble` 任务, 生成模板文件, 然后再次构建并部署 App", "bq_annotation_gradle_task_inrt_rebuild_if_needed": "注: 当主项目代码发生变更, 且希望将变更同步到打包应用时, 需要重新运行 `inrt:assemble` 任务生成模板文件并再次部署 App",
"bq_annotation_jdk_preparation_skip_if_jdk_installed": "注: 如果计算机系统已安装 JDK 且版本满足上述要求, 则可跳过此小节内容", "bq_annotation_jdk_preparation_skip_if_jdk_installed": "注: 如果计算机系统已安装 JDK 且版本满足上述要求, 则可跳过此小节内容",
"h3_contribution": "贡献参与", "h3_contribution": "贡献参与",
"h3_environment": "环境", "h3_environment": "环境",

View File

@@ -8,7 +8,7 @@
"bq_annotation_autojs6_project_cloning_retry_clone": "注: 上述過程可能非常耗時. 若網絡條件欠佳, 可能需要重試多次 (點擊 Retry 按鈕)", "bq_annotation_autojs6_project_cloning_retry_clone": "注: 上述過程可能非常耗時. 若網絡條件欠佳, 可能需要重試多次 (點擊 Retry 按鈕)",
"bq_annotation_autojs6_project_deploy_apk": "注: 關於如何構建應用以向用户發佈的更多內容, 可參閲 [Android Docs](https://developer.android.com/build/build-for-release?hl=zh-cn)", "bq_annotation_autojs6_project_deploy_apk": "注: 關於如何構建應用以向用户發佈的更多內容, 可參閲 [Android Docs](https://developer.android.com/build/build-for-release?hl=zh-cn)",
"bq_annotation_autojs6_resources_cloning_install_git_note": "注: 上述過程可能需要安裝 [Git (分佈式版本控制系統)](https://git-scm.com/download)", "bq_annotation_autojs6_resources_cloning_install_git_note": "注: 上述過程可能需要安裝 [Git (分佈式版本控制系統)](https://git-scm.com/download)",
"bq_annotation_gradle_task_inrt_rebuild_if_needed": "這表明模板文件不存在, 需要手動運行一次 `inrt:assemble` 任務, 生成模板文件, 然後再次構建並部署 App", "bq_annotation_gradle_task_inrt_rebuild_if_needed": "注: 當主項目代碼發生變更, 且希望將變更同步到打包應用時, 需要重新運行 `inrt:assemble` 任務生成模板文件並再次部署 App",
"bq_annotation_jdk_preparation_skip_if_jdk_installed": "注: 如果計算機系統已安裝 JDK 且版本滿足上述要求, 則可跳過此小節內容", "bq_annotation_jdk_preparation_skip_if_jdk_installed": "注: 如果計算機系統已安裝 JDK 且版本滿足上述要求, 則可跳過此小節內容",
"h3_contribution": "貢獻參與", "h3_contribution": "貢獻參與",
"h3_environment": "環境", "h3_environment": "環境",

View File

@@ -8,7 +8,7 @@
"bq_annotation_autojs6_project_cloning_retry_clone": "注: 上述過程可能非常耗時. 若網路條件欠佳, 可能需要重試多次 (點選 Retry 按鈕)", "bq_annotation_autojs6_project_cloning_retry_clone": "注: 上述過程可能非常耗時. 若網路條件欠佳, 可能需要重試多次 (點選 Retry 按鈕)",
"bq_annotation_autojs6_project_deploy_apk": "注: 關於如何構建應用以向用戶釋出的更多內容, 可參閱 [Android Docs](https://developer.android.com/build/build-for-release?hl=zh-cn)", "bq_annotation_autojs6_project_deploy_apk": "注: 關於如何構建應用以向用戶釋出的更多內容, 可參閱 [Android Docs](https://developer.android.com/build/build-for-release?hl=zh-cn)",
"bq_annotation_autojs6_resources_cloning_install_git_note": "注: 上述過程可能需要安裝 [Git (分散式版本控制系統)](https://git-scm.com/download)", "bq_annotation_autojs6_resources_cloning_install_git_note": "注: 上述過程可能需要安裝 [Git (分散式版本控制系統)](https://git-scm.com/download)",
"bq_annotation_gradle_task_inrt_rebuild_if_needed": "這表明模板檔案不存在, 需要手動執行一次 `inrt:assemble` 任務, 生成模板檔案, 然後再次構建並部署 App", "bq_annotation_gradle_task_inrt_rebuild_if_needed": "注: 當主專案程式碼發生變更, 且希望將變更同步到打包應用時, 需要重新執行 `inrt:assemble` 任務生成模板檔案並再次部署 App",
"bq_annotation_jdk_preparation_skip_if_jdk_installed": "注: 如果計算機系統已安裝 JDK 且版本滿足上述要求, 則可跳過此小節內容", "bq_annotation_jdk_preparation_skip_if_jdk_installed": "注: 如果計算機系統已安裝 JDK 且版本滿足上述要求, 則可跳過此小節內容",
"h3_contribution": "貢獻參與", "h3_contribution": "貢獻參與",
"h3_environment": "環境", "h3_environment": "環境",

101
README.md
View File

@@ -155,6 +155,13 @@ AutoJs6 在 Auto.js 最终项目的基础上, 于 `2021/12/01` 进行二次开
****** ******
# v6.6.3
###### 2025/04/16
* `修复` 主页文档标签显示在线文档时部分内容被系统导航栏遮挡的问题
* `优化` 部分依赖或本地库版本调整 _[`CHANGELOG.md`](http://project.autojs6.com/blob/master/app/src/main/assets-app/doc/CHANGELOG.md#v663)_
# v6.6.2 # v6.6.2
###### 2025/04/16 ###### 2025/04/16
@@ -233,96 +240,6 @@ AutoJs6 在 Auto.js 最终项目的基础上, 于 `2021/12/01` 进行二次开
* `优化` 同步最新的 Rhino 引擎官方上游代码并进行必要的代码适配 * `优化` 同步最新的 Rhino 引擎官方上游代码并进行必要的代码适配
* `优化` 部分依赖或本地库版本调整 _[`CHANGELOG.md`](http://project.autojs6.com/blob/master/app/src/main/assets-app/doc/CHANGELOG.md#v661)_ * `优化` 部分依赖或本地库版本调整 _[`CHANGELOG.md`](http://project.autojs6.com/blob/master/app/src/main/assets-app/doc/CHANGELOG.md#v661)_
# v6.6.0
###### 2024/12/02 - 内置模块重写, 谨慎升级
* `提示` 内置模块使用 Kotlin 重新编写以提升脚本运行效率但可能需要多次迭代逐步完善
* `提示` 内置 init.js 文件默认为空但支持开发者自行扩展内置模块或挂载外部模块
* `新增` axios 模块 / cheerio 模块 (Ref to [AutoX](https://github.com/kkevsekk1/AutoX))
* `新增` sqlite 模块, 用于 SQLite 数据库简单操作 (Ref to [Auto.js Pro](https://g.pro.autojs.org/)) (参阅 项目文档 > [SQLite](https://docs.autojs6.com/#/sqlite))
* `新增` mime 模块, 用于处理和解析 MIME 类型字符串 (参阅 项目文档 > [MIME](https://docs.autojs6.com/#/mime))
* `新增` nanoid 模块, 可作为字符串 ID 生成器 (Ref to [ai/nanoid](https://github.com/ai/nanoid))
* `新增` sysprops 模块, 用于获取运行时环境配置数据 (参阅 项目文档 > [系统属性](https://docs.autojs6.com/#/sysprops))
* `新增` ocr 模块支持 [Rapid OCR](https://github.com/RapidAI/RapidOCR) 引擎
* `新增` 布局分析支持切换窗口 (Ref to [Auto.js Pro](https://g.pro.autojs.org/))
* `新增` auto.clearCache 方法, 支持清除控件缓存 (Ref to [Auto.js Pro](https://g.pro.autojs.org/))
* `新增` threads.pool 方法, 支持线程池简单应用 (Ref to [Auto.js Pro](https://g.pro.autojs.org/))
* `新增` images.matchTemplate 方法增加 useTransparentMask 选项参数, 支持透明找图 (Ref to [Auto.js Pro](https://g.pro.autojs.org/))
* `新增` images.requestScreenCaptureAsync 方法, 用于 UI 模式异步方式申请截图权限 (Ref to [Auto.js Pro](https://g.pro.autojs.org/))
* `新增` images.requestScreenCapture 方法增加 isAsync 选项参数, 支持异步方式获取屏幕截图 (Ref to [Auto.js Pro](https://g.pro.autojs.org/))
* `新增` images.on('screen_capture', callback) 等事件监听方法, 支持监听屏幕截图可用事件 (Ref to [Auto.js Pro](https://g.pro.autojs.org/))
* `新增` images.stopScreenCapture 方法, 支持主动释放截图申请的相关资源 (Ref to [Auto.js Pro](https://g.pro.autojs.org/))
* `新增` images.psnr/mse/ssim/mssim/hist/ncc 及 images.getSimilarity 方法, 用于获取图像相似性度量值
* `新增` images.isGrayscale 方法, 用于判断图像是否为灰度图像
* `新增` images.invert 方法, 用于反色图像转换
* `新增` s13n.point/time 方法, 用于标准化点对象及时长对象 (参阅 项目文档 > [标准化](https://docs.autojs6.com/#/s13n))
* `新增` console 模块 gravity (重力), touchThrough (穿透点击), backgroundTint (背景着色) 等相关方法 (参阅 项目文档 > [控制台](https://docs.autojs6.com/#/console))
* `新增` Mathx.randomInt/Mathx.randomFloat 方法, 用于返回指定范围内的随机整数或随机浮点数
* `新增` app.launchDual/startDualActivity 等方法, 用于处理双开应用 (需要 Shizuku 或 Root 权限) (实验性)
* `新增` app.kill 方法, 用于强制停止应用 (需要 Shizuku 或 Root 权限)
* `新增` floaty.getClip 方法, 用于借助浮动窗口聚焦间接获取剪切板内容
* `修复` Fragment 子类 (如 [DrawerFragment](https://github.com/SuperMonster003/AutoJs6/blob/17616504ab0bba93b30ab7abc67108ee5253f39a/app/src/main/java/org/autojs/autojs/ui/main/drawer/DrawerFragment.kt#L369) / [ExplorerFragment](https://github.com/SuperMonster003/AutoJs6/blob/17616504ab0bba93b30ab7abc67108ee5253f39a/app/src/main/java/org/autojs/autojs/ui/main/scripts/ExplorerFragment.kt#L48) 等) 中存在的 View Binding 内存泄漏
* `修复` [ScreenCapture](https://github.com/SuperMonster003/AutoJs6/blob/17616504ab0bba93b30ab7abc67108ee5253f39a/app/src/main/java/org/autojs/autojs/core/image/capture/ScreenCapturer.java#L70) / [ThemeColorPreference](https://github.com/SuperMonster003/AutoJs6/blob/10960ddbee71f75ef80907ad5b6ab42f3e1bf31e/app/src/main/java/org/autojs/autojs/ui/settings/ThemeColorPreference.kt#L21) 等类中存在的实例内存泄漏
* `修复` Android 14 申请截图权限导致应用崩溃的问题 (by [chenguangming](https://github.com/chenguangming)) _[`pr #242`](http://pr.autojs6.com/242)_
* `修复` Android 14 开启前台服务导致应用崩溃的问题
* `修复` Android 14 代码编辑器运行按钮点击后无法正常亮起的问题
* `修复` 项目打包后应用可能因缺少必要库文件无法正常运行的问题 _[`issue #202`](http://issues.autojs6.com/202)_ _[`issue #223`](http://issues.autojs6.com/223)_ _[`pr #264`](http://pr.autojs6.com/264)_
* `修复` 编辑项目时可能因指定图标资源不存在而导致应用崩溃的问题 _[`issue #203`](http://issues.autojs6.com/203)_
* `修复` 截图权限申请时无法正常使用参数获取指定屏幕方向的截图资源
* `修复` 部分设备无法正常添加脚本快捷方式的问题 (试修) _[`issue #221`](http://issues.autojs6.com/221)_
* `修复` 调用 http 模块与发送请求相关的方法将出现累积性请求发送延迟的问题 _[`issue #192`](http://issues.autojs6.com/192)_
* `修复` Shizuku 服务在 AutoJs6 进入主活动页面之前可能无法正常使用的问题 (试修) _[`issue #255`](http://issues.autojs6.com/255)_
* `修复` random(min, max) 方法可能出现结果越界的问题
* `修复` pickup 方法结果类型参数无法正常传入空数组的问题
* `修复` UiObject#bounds() 得到的控件矩形可能被意外修改而破坏其不变性的问题
* `修复` text/button/input 元素的文本内容包含半角双引号时无法正常解析的问题
* `修复` text/textswitcher 元素的 autoLink 属性功能失效的问题
* `修复` 不同脚本可能错误地共享同一个 ScriptRuntime 对象的问题
* `修复` 全局变量 HEIGHT 及 WIDTH 丢失 getter 动态属性的问题
* `修复` 脚本启动时 RootShell 随即加载可能导致启动高延迟的问题
* `修复` 控制台浮动窗口设置背景颜色导致矩形圆角样式丢失的问题
* `修复` 无障碍服务自动启动可能出现的服务异常问题 (试修)
* `修复` 主页文档页面左右滑动 WebView 控件时可能触发 ViewPager 切换的问题
* `修复` 文件管理器无法识别包含大写字母文件扩展名的问题
* `修复` 文件管理器首次进入项目目录时可能无法自动识别项目的问题
* `修复` 文件管理器删除文件夹后页面无法自动刷新的问题
* `修复` 文件管理器排序文件及文件夹时可能出现 ASCII 首字母名称置后的问题
* `修复` 代码编辑器调试功能的 FAILED ASSERTION 异常
* `修复` 代码编辑器调试过程中关闭编辑器后无法再次正常调试的问题
* `修复` 代码编辑器跳转到行尾时可能遗漏末尾字符的问题
* `修复` 主活动页面启动日志活动页面时可能出现闪屏的问题
* `修复` 打包应用无法正常使用 opencc 模块的问题
* `优化` 打包页面中 "不可用 ABI" 控件的点击提示体验
* `优化` 支持使用 Shizuku 控制 "指针位置" 显示开关
* `优化` 支持使用 Shizuku 控制 "投影媒体" 及 "修改安全设置" 权限开关
* `优化` automator.gestureAsync/gesturesAsync 支持回调函数参数
* `优化` tasks 模块使用同步方式进行数据库操作避免可能的数据访问不一致问题
* `优化` 脚本执行模式支持管道符号分隔模式参数 (如 `"ui|auto";` 开头)
* `优化` 脚本执行模式支持单引号及反引号且支持省略分号 (如 `'ui';` 或 `'ui'` 开头)
* `优化` 脚本执行模式支持 axios, cheerio, dayjs 等模式参数快捷导入内置扩展模块 (如 `"axios";` 开头)
* `优化` 脚本执行模式支持 x 或 jsox 模式参数快捷启用 JavaScript 内置对象扩展模块 (如 `"x";` 开头)
* `优化` img 元素 src 及 path 属性支持本地相对路径 (如 `<img src="a.png"` />)
* `优化` 代码编辑器导入 Java 类和包名时支持智能判断插入位置
* `优化` images 模块支持直接使用路径作为图像参数
* `优化` importPackage 支持字符串参数
* `优化` 服务端模式 IP 地址支持剪切板导入智能识别且支持空格按键智能转换
* `优化` 文件管理器新建文件时支持默认前缀选择并自动生成合适的数字后缀
* `优化` 文件管理器运行项目时具体化异常消息提示 _[`issue #268`](http://issues.autojs6.com/268)_
* `优化` 文件管理器支持更多类型并支持显示对应的图标符号 (支持 800 多种文件类型)
* `优化` 文件管理器可编辑的文件类型 (jpg/doc/pdf...) 增加编辑按钮
* `优化` 文件管理器 APK 文件支持查看基础信息, Manifest 信息及权限列表
* `优化` 文件管理器音视频等媒体文件支持查看基础信息及 MediaInfo 信息
* `优化` 打包单文件时支持自动填入合适的标准化名包并支持无效字符过滤提示
* `优化` 打包单文件时支持根据已安装同包名应用自动设置图标并自增版本号及版本名称
* `优化` 打包项目配置文件支持 abis/libs 选项指定默认包含的 ABI 架构及扩展库
* `优化` 打包项目配置文件 abis/libs 选项无效或无可用时支持相关消息提示
* `优化` LeakCanary 在正式发行版本中被排除以避免增加不必要性
* `优化` 项目源代码所有英文注释增加简体中文翻译以增强注释可读性
* `优化` README 及 CHANGELOG 支持多语言 (由脚本自动生成)
* `优化` Gradle 构建脚本提升版本自适应能力
* `优化` 部分依赖或本地库版本调整 _[`CHANGELOG.md`](http://project.autojs6.com/blob/master/app/src/main/assets-app/doc/CHANGELOG.md#v660)_
##### 更多版本历史可参阅 ##### 更多版本历史可参阅
* [CHANGELOG.md](http://project.autojs6.com/blob/master/app/src/main/assets-app/doc/CHANGELOG-zh-Hans.md) * [CHANGELOG.md](http://project.autojs6.com/blob/master/app/src/main/assets-app/doc/CHANGELOG-zh-Hans.md)
@@ -388,7 +305,7 @@ SDK Tools (SDK 工具) (位于右侧窗口)
AutoJs6 项目依赖的 `JDK (Java 开发工具包)` 发行版本不低于 `17`, 但建议不低于 `19`. AutoJs6 项目依赖的 `JDK (Java 开发工具包)` 发行版本不低于 `17`, 但建议不低于 `19`.
截至 2025 年 4 月 16 日, AutoJs6 可支持 JDK 最高版本为 `24`. 截至 2025 年 4 月 17 日, AutoJs6 可支持 JDK 最高版本为 `24`.
> 注: 如果计算机系统已安装 JDK 且版本满足上述要求, 则可跳过此小节内容. > 注: 如果计算机系统已安装 JDK 且版本满足上述要求, 则可跳过此小节内容.
@@ -476,7 +393,7 @@ AutoJs6 项目拥有不同的构建变体, 其中 "inrt" 变体用于实现 Auto
这表明模板文件不存在, 需要手动运行一次 `inrt:assemble` 任务, 生成模板文件, 然后再次构建并部署 App. 这表明模板文件不存在, 需要手动运行一次 `inrt:assemble` 任务, 生成模板文件, 然后再次构建并部署 App.
> 这表明模板文件不存在, 需要手动运行一次 `inrt:assemble` 任务, 生成模板文件, 然后再次构建并部署 App > 注: 当主项目代码发生变更, 且希望将变更同步到打包应用时, 需要重新运行 `inrt:assemble` 任务生成模板文件并再次部署 App
- AutoJs6 [app:bundle] - AutoJs6 [app:bundle]

View File

@@ -4,6 +4,12 @@
****** ******
# v6.6.3
###### 2025/04/16
* `修复` 主页文档标签显示在线文档时部分内容被系统导航栏遮挡的问题
# v6.6.2 # v6.6.2
###### 2025/04/16 ###### 2025/04/16

View File

@@ -4,6 +4,12 @@
****** ******
# v6.6.3
###### 2025/04/16
* `修复` 主页文档标签显示在线文档时部分内容被系统导航栏遮挡的问题
# v6.6.2 # v6.6.2
###### 2025/04/16 ###### 2025/04/16

View File

@@ -62,6 +62,21 @@ public class AutoIndent implements TextWatcher {
@Override @Override
public void afterTextChanged(Editable s) { public void afterTextChanged(Editable s) {
// @Commented by SuperMonster003 on Apr 17, 2025.
// ! Does not work as expected.
// ! zh-CN: 未能达到预期效果.
// # // 换行符标准化: CRLF 或单独的 CR 替换成 LF
// # String original = s.toString();
// # String normalized = original
// # .replace("\r\n", "\n")
// # .replace("\r", "\n");
// # if (!normalized.equals(original)) {
// # mInsertingIndent = true;
// # s.replace(0, s.length(), normalized);
// # mInsertingIndent = false;
// # // 结束后返回等待下一次回调
// # return;
// # }
if (mInsertingIndent || !mAutoIndent) { if (mInsertingIndent || !mAutoIndent) {
return; return;
} }

View File

@@ -32,11 +32,11 @@ import android.os.Bundle
import android.os.Parcelable import android.os.Parcelable
import android.text.Layout import android.text.Layout
import android.util.AttributeSet import android.util.AttributeSet
import android.util.Log
import android.view.Gravity import android.view.Gravity
import android.view.MotionEvent import android.view.MotionEvent
import android.widget.TextViewHelper import android.widget.TextViewHelper
import androidx.appcompat.widget.AppCompatEditText import androidx.appcompat.widget.AppCompatEditText
import androidx.core.graphics.withTranslation
import org.autojs.autojs.ui.edit.editor.CodeEditor.BreakpointChangeListener import org.autojs.autojs.ui.edit.editor.CodeEditor.BreakpointChangeListener
import org.autojs.autojs.ui.edit.editor.CodeEditor.CursorChangeCallback import org.autojs.autojs.ui.edit.editor.CodeEditor.CursorChangeCallback
import org.autojs.autojs.ui.edit.editor.JavaScriptHighlighter.HighlightTokens import org.autojs.autojs.ui.edit.editor.JavaScriptHighlighter.HighlightTokens
@@ -110,46 +110,71 @@ class CodeEditText : AppCompatEditText {
} }
override fun onDraw(canvas: Canvas) { override fun onDraw(canvas: Canvas) {
if (mParentScrollView == null) { try {
mParentScrollView = parent as HVScrollView mParentScrollView = parent as? HVScrollView ?: return super.onDraw(canvas)
}
if (layout == null) { layout ?: return super.onDraw(canvas).also { postInvalidate() }
updatePaddingForGutter()
updateLineRangeForDraw(canvas)
// 检查行范围是否有效
if (mFirstLineForDraw < 0 || mFirstLineForDraw > mLastLineForDraw) {
return super.onDraw(canvas)
}
// 绘制行高亮需要在绘制光标之前
drawLineHighlights(canvas)
// 调用 super.onDraw 绘制光标和选择高亮
// 因为字体颜色被设置为透明
// 因此 super.onDraw 绘制的字体不显示
// TODO by Stardust on Feb 24, 2018.
// ! 优化效率.
// ! 不绘制透明字体.
// ! en-US (translated by SuperMonster003 on Jul 29, 2024):
// ! Optimize efficiency.
// ! Don't draw transparent fonts.
super.onDraw(canvas) super.onDraw(canvas)
invalidate()
return runCatching {
// canvas.save()
// canvas.translate(0f, extendedPaddingTop.toFloat())
// drawText(canvas)
// canvas.restore()
canvas.withTranslation(0f, extendedPaddingTop.toFloat()) {
drawText(this)
}
}.onFailure { it.printStackTrace() }
} catch (e: Exception) {
e.printStackTrace()
runCatching {
super.onDraw(canvas)
}.onFailure { it.printStackTrace() }
} }
updatePaddingForGutter()
updateLineRangeForDraw(canvas)
// 绘制行高亮需要在绘制光标之前
drawLineHighlights(canvas)
// 调用 super.onDraw 绘制光标和选择高亮
// 因为字体颜色被设置为透明
// 因此 super.onDraw 绘制的字体不显示
// TODO by Stardust on Feb 24, 2018.
// ! 优化效率.
// ! 不绘制透明字体.
// ! en-US (translated by SuperMonster003 on Jul 29, 2024):
// ! Optimize efficiency.
// ! Don't draw transparent fonts.
super.onDraw(canvas)
canvas.save()
canvas.translate(0f, extendedPaddingTop.toFloat())
drawText(canvas)
canvas.restore()
} }
private fun drawLineHighlights(canvas: Canvas) { private fun drawLineHighlights(canvas: Canvas) {
val debugHighlightLine = mDebuggingLine try {
if (debugHighlightLine != currentLine) { if (lineCount <= 0) return
// 绘制当前行高亮
mLineHighlightPaint.color = mTheme.lineHighlightBackgroundColor val debugHighlightLine = mDebuggingLine
drawLineHighlight(canvas, mLineHighlightPaint, this.currentLine) val curLine = currentLine
}
if (debugHighlightLine != -1) { // 确保当前行在有效范围内
mLineHighlightPaint.color = mTheme.debuggingLineBackgroundColor if (curLine >= 0 && curLine < lineCount && debugHighlightLine != curLine) {
drawLineHighlight(canvas, mLineHighlightPaint, debugHighlightLine) // 绘制当前行高亮
mLineHighlightPaint.color = mTheme.lineHighlightBackgroundColor
drawLineHighlight(canvas, mLineHighlightPaint, curLine)
}
// 确保调试行在有效范围内
if (debugHighlightLine >= 0 && debugHighlightLine < lineCount) {
mLineHighlightPaint.color = mTheme.debuggingLineBackgroundColor
drawLineHighlight(canvas, mLineHighlightPaint, debugHighlightLine)
}
} catch (e: Exception) {
e.printStackTrace()
} }
} }
@@ -162,7 +187,7 @@ class CodeEditText : AppCompatEditText {
} }
private fun updatePaddingForGutter() { private fun updatePaddingForGutter() {
// 根据行号计算左边距padding 留出绘制行号的空间 // 根据行号计算左边距 padding 留出绘制行号的空间
val max = lineCount.toString() val max = lineCount.toString()
val gutterWidth = paint.measureText(max) + 20 val gutterWidth = paint.measureText(max) + 20
if (paddingLeft.toFloat() != gutterWidth) { if (paddingLeft.toFloat() != gutterWidth) {
@@ -170,83 +195,129 @@ class CodeEditText : AppCompatEditText {
} }
} }
// 该方法中内联了很多函数来提高效率 但这是必要的吗 // 该方法中内联了很多函数来提高效率, 但这是必要的吗?
// 绘制文本着色 // 绘制文本着色
private fun drawText(canvas: Canvas) { private fun drawText(canvas: Canvas) {
var line = mFirstLineForDraw if (mFirstLineForDraw < 0) return
if (line < 0) {
return
}
val textLength = mHighlightTokens?.text?.length ?: 0 val textLength = mHighlightTokens?.text?.length ?: 0
val scrollX = (mParentScrollView!!.scrollX + scrollX - paddingLeft).coerceAtLeast(0) val scrollX = (mParentScrollView!!.scrollX + scrollX - paddingLeft).coerceAtLeast(0)
while (line <= mLastLineForDraw && line < lineCount) {
val lineBottom = layout.getLineTop(line + 1) for (line in mFirstLineForDraw..lineCount.coerceAtMost(mLastLineForDraw)) {
if (line >= lineCount) continue
val lineNumber = line + 1
val lineNumberText = "$lineNumber"
val lineBottom = layout.getLineTop(lineNumber)
val lineTop = layout.getLineTop(line) val lineTop = layout.getLineTop(line)
val lineBaseline = lineBottom - layout.getLineDescent(line) val lineBaseline = lineBottom - layout.getLineDescent(line)
val highlightTokens = mHighlightTokens val highlightTokens = mHighlightTokens
// drawLineNumber // if there is a breakpoint at this line, draw a highlight background for line number
val lineNumberText = (line + 1).toString()
// if there is a breakpoint at this line, draw highlight background for line number
if (breakpoints.containsKey(line)) { if (breakpoints.containsKey(line)) {
canvas.drawRect(0f, lineTop.toFloat(), (paddingLeft - 10).toFloat(), lineBottom.toFloat(), paint.apply { color = mTheme.breakpointColor }) canvas.drawRect(
} /* left = */ 0f,
canvas.drawText(lineNumberText, 0, lineNumberText.length, 10f, lineBaseline.toFloat(), paint.apply { color = mTheme.lineNumberColor }) /* top = */ lineTop.toFloat(),
if (highlightTokens == null) { /* right = */ (paddingLeft - 10).toFloat(),
line++ /* bottom = */ lineBottom.toFloat(),
continue /* paint = */ paint.apply { color = mTheme.breakpointColor },
)
} }
canvas.drawText(
/* text = */ lineNumberText,
/* start = */ 0,
/* end = */ lineNumberText.length,
/* x = */ 10f,
/* y = */ lineBaseline.toFloat(),
/* paint = */ paint.apply { color = mTheme.lineNumberColor },
)
if (highlightTokens == null) continue
// Draw code
// drawCode
val lineStart = layout.getLineStart(line) val lineStart = layout.getLineStart(line)
if (lineStart >= textLength) { val lineVisibleEnd = layout.getLineVisibleEnd(line)
return
} if (lineStart >= textLength) continue
val lineEnd = layout.getLineVisibleEnd(line).coerceAtMost(highlightTokens.colors.size) if (lineVisibleEnd > textLength) continue
// @Reference to LYS86 (https://github.com/LYS86) by SuperMonster003 on Apr 17, 2025.
// ! https://github.com/LYS86/AutoJs/blob/05a7e48a8d5b0c6207b3d2974f762c050156298c/app/src/main/java/org/autojs/autojs/ui/edit/editor/CodeEditText.java#L232
if (lineStart == lineVisibleEnd) continue
val lineEnd = lineVisibleEnd.coerceAtMost(highlightTokens.colors.size)
val visibleCharStart = getVisibleCharIndex(paint, scrollX, lineStart, lineEnd) val visibleCharStart = getVisibleCharIndex(paint, scrollX, lineStart, lineEnd)
val visibleCharEnd = getVisibleCharIndex(paint, scrollX + mParentScrollView!!.width, lineStart, lineEnd) + 1 var visibleCharEnd = getVisibleCharIndex(paint, scrollX + mParentScrollView!!.width, lineStart, lineEnd) + 1
var previousColorPos = visibleCharStart.coerceAtMost(highlightTokens.colors.size - 1)
val safeText = text ?: continue
val localColors = highlightTokens.colors
if (visibleCharStart >= visibleCharEnd) continue
if (visibleCharStart >= safeText.length) continue
if (visibleCharStart < 0) continue
var previousColorPos = visibleCharStart.coerceIn(0, minOf(localColors.size, safeText.length) - 1)
var previousColor = when (previousColorPos) { var previousColor = when (previousColorPos) {
mUnmatchedBracket -> mTheme.getColorForToken(Token.ERROR) mUnmatchedBracket -> mTheme.getColorForToken(Token.ERROR)
mMatchingBrackets[0], mMatchingBrackets[1] -> mTheme.getColorForToken(TokenMapping.TOKEN_MATCHED_BRACKET) mMatchingBrackets[0], mMatchingBrackets[1] -> mTheme.getColorForToken(TokenMapping.TOKEN_MATCHED_BRACKET)
else -> highlightTokens.colors[previousColorPos] else -> localColors[previousColorPos.coerceAtMost(localColors.size - 1)]
} }
val safeVisibleCharEnd = minOf(visibleCharEnd, safeText.length, lineEnd)
if (previousColorPos >= safeVisibleCharEnd) continue
var i = previousColorPos var i = previousColorPos
while (i < visibleCharEnd) { while (i < safeVisibleCharEnd) {
val color = when (i) { val color = when (i) {
mUnmatchedBracket -> mTheme.getColorForToken(Token.ERROR) mUnmatchedBracket -> mTheme.getColorForToken(Token.ERROR)
mMatchingBrackets[0], mMatchingBrackets[1] -> mTheme.getColorForToken(TokenMapping.TOKEN_MATCHED_BRACKET) mMatchingBrackets[0], mMatchingBrackets[1] -> mTheme.getColorForToken(TokenMapping.TOKEN_MATCHED_BRACKET)
else -> highlightTokens.colors[i.coerceAtMost(highlightTokens.colors.size - 1)] in 0 until localColors.size -> localColors[i]
else -> previousColor
} }
if (previousColor != color) { if (previousColor != color) {
paint.color = previousColor paint.color = previousColor
val offsetX = paint.measureText(text, lineStart, previousColorPos) runCatching {
canvas.drawText(text!!, previousColorPos, i, paddingLeft + offsetX, lineBaseline.toFloat(), paint) val offsetX = paint.measureText(safeText, lineStart, previousColorPos)
canvas.drawText(safeText, previousColorPos, i, paddingLeft + offsetX, lineBaseline.toFloat(), paint)
}
previousColor = color previousColor = color
previousColorPos = i previousColorPos = i
} }
i++ i++
} }
paint.color = previousColor paint.color = previousColor
try {
if (previousColorPos < 0) { visibleCharEnd = visibleCharEnd.coerceAtMost(textLength)
throw IndexOutOfBoundsException("Proactively throw a local exception as \"previousColorPos < 0\"") if (previousColorPos >= visibleCharEnd) continue
}
if (visibleCharEnd > textLength) { val currentText = text ?: continue
throw IndexOutOfBoundsException("Proactively throw a local exception as \"visibleCharEnd > textLength\"")
} if (previousColorPos >= currentText.length || visibleCharEnd > currentText.length) {
if (previousColorPos >= visibleCharEnd) { previousColorPos = previousColorPos.coerceIn(0, currentText.length - 1)
throw IndexOutOfBoundsException("Proactively throw a local exception as \"previousColorPos >= visibleCharEnd\"") visibleCharEnd = visibleCharEnd.coerceAtMost(currentText.length)
} if (previousColorPos >= visibleCharEnd) continue
val offsetX = paint.measureText(text, lineStart, previousColorPos) }
canvas.drawText(text!!, previousColorPos, visibleCharEnd, paddingLeft + offsetX, lineBaseline.toFloat(), paint)
} catch (ex: IndexOutOfBoundsException) { runCatching {
Log.e(TAG, "IndexOutOfBounds: previousColorPos = $previousColorPos, visibleCharEnd = $visibleCharEnd, textLength = $textLength") val offsetX = paint.measureText(currentText, lineStart, previousColorPos)
ex.printStackTrace() canvas.drawText(currentText, previousColorPos, visibleCharEnd, paddingLeft + offsetX, lineBaseline.toFloat(), paint)
return }.onFailure {
it.printStackTrace()
runCatching {
paint.color = mTheme.lineNumberColor
canvas.drawText(
/* text = */ lineNumberText,
/* start = */ 0,
/* end = */ lineNumberText.length,
/* x = */ paddingLeft.toFloat(),
/* y = */ lineBaseline.toFloat(),
/* paint = */ paint,
)
}
} }
line++
} }
} }
@@ -260,7 +331,7 @@ class CodeEditText : AppCompatEditText {
} }
private fun getVisibleCharIndex(paint: Paint, x: Int, lineStart: Int, lineEnd: Int): Int { private fun getVisibleCharIndex(paint: Paint, x: Int, lineStart: Int, lineEnd: Int): Int {
if (x == 0) { if (x <= 0 || lineStart >= lineEnd || lineStart >= text!!.length || lineEnd <= 0) {
return lineStart return lineStart
} }
var low = lineStart var low = lineStart

View File

@@ -1,5 +1,5 @@
#Wed Apr 16 23:21:45 CST 2025 #Thu Apr 17 18:03:05 CST 2025
BUILD_TIME=1744816905509 BUILD_TIME=1744884185114
COMPILE_SDK_VERSION=35 COMPILE_SDK_VERSION=35
JAVA_VERSION=23 JAVA_VERSION=23
JAVA_VERSION_MIN_RADICAL=0 JAVA_VERSION_MIN_RADICAL=0
@@ -17,6 +17,6 @@ RAPID_OCR_OPENCV_MOBILE_LABEL_VERSION=13
RAPID_OCR_OPENCV_MOBILE_VERSION=4.5.3 RAPID_OCR_OPENCV_MOBILE_VERSION=4.5.3
TARGET_SDK_VERSION=35 TARGET_SDK_VERSION=35
TARGET_SDK_VERSION_INRT=29 TARGET_SDK_VERSION_INRT=29
VERSION_BUILD=3144 VERSION_BUILD=3146
VERSION_NAME=6.6.3 Alpha VERSION_NAME=6.6.3 Alpha
VSCODE_EXT_REQUIRED_VERSION=1.0.8 VSCODE_EXT_REQUIRED_VERSION=1.0.8