diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index 1f99c8aa6a3c7a7e068a499edb89f4e79c54fc47..136ec5483ce71e4f6d82bece60417aea19961a6c 100644 --- a/entry/src/main/ets/pages/Index.ets +++ b/entry/src/main/ets/pages/Index.ets @@ -34,7 +34,7 @@ struct Index { .onError(() => { hilog.info(0x0000, 'testTag', 'load imagePath fail: %{public}s.', this.imagePath); // when the target image is not found (path loading fails), a warning dialog box is displayed. - AlertDialog.show({ + this.getUIContext().showAlertDialog({ title: $r('app.string.image_error_dialog_title'), message: $r('app.string.image_error_dialog_message'), autoCancel: true,