From caa51066e2376a9abe4b78bcf7a50325defb0948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=8B=A4=E6=B0=91?= Date: Tue, 26 Aug 2025 15:39:05 +0800 Subject: [PATCH] =?UTF-8?q?build(Basic=20&=20SDK):=20=E5=B0=86=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E6=A8=A1=E5=BC=8F=E4=BB=8E=20debug=20=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=20release-=20=E5=9C=A8=20BuildProfile.ets=20?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=AD=E5=B0=86=20BUILD=5FMODE=5FNAME=20?= =?UTF-8?q?=E4=BB=8E=20'debug'=20=E6=94=B9=E4=B8=BA=20'release'=20-=20?= =?UTF-8?q?=E5=B0=86=20DEBUG=20=E5=8F=98=E9=87=8F=E4=BB=8E=20true=20?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=20false=20-=20=E6=9B=B4=E6=96=B0=20CHANGELOG?= =?UTF-8?q?.md=EF=BC=8C=E6=B7=BB=E5=8A=A0=E8=A7=A3=E5=86=B3=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E7=8A=B6=E6=80=81=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E7=9A=84=E8=AF=B4=E6=98=8E=20-=20=E4=BF=AE=E6=94=B9=20README.m?= =?UTF-8?q?d=20=E4=B8=AD=E7=9A=84=20AppAbility=20=E7=A4=BA=E4=BE=8B?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=EF=BC=8C=E4=BC=98=E5=8C=96=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E5=92=8C=E7=AA=97=E5=8F=A3=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BuildProfile.ets | 4 ++-- CHANGELOG.md | 1 + README.md | 8 +++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/BuildProfile.ets b/BuildProfile.ets index 7b63954..b2b828e 100644 --- a/BuildProfile.ets +++ b/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.10'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ce89cc..f6bd62e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ > - `ToolsHelper.showConfirmDialog()`&`ToolsHelper.showAlertDialog()`添加自定义`UI`功能 > - 添加一个`ImageHelper`,处理图片相关 > - 添加一个`SwipeView`,左滑删除的item组件 +> - 修改初始化逻辑,解决`This window state is abnormal`的问题 > # [v1.0.9] 2025.04.06 diff --git a/README.md b/README.md index de32d6a..a66c4e7 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,16 @@ import { GlobalContext } from '@szyx/sdk_base'; export default class AppAbility extends UIAbility { onWindowStageCreate(windowStage: window.WindowStage): void { + GlobalContext.setContext(this.context) + windowStage.loadContent('pages/Index', (err) => { if (err.code) { - hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + LogHelper.error(`Failed to load the content. Cause: ${JSON.stringify(err) ?? ''}`); return; } + hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.'); + WindowHelper.windowClass = windowStage.getMainWindowSync() }); - // 这行代码 - GlobalContext.setContext(this.context) } } ```