원클릭으로
build-harmonyos-app
Build, verify, and locate the packaged HarmonyOS app for this repository using Hvigor from DevEco Studio.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Build, verify, and locate the packaged HarmonyOS app for this repository using Hvigor from DevEco Studio.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | Build HarmonyOS App |
| description | Build, verify, and locate the packaged HarmonyOS app for this repository using Hvigor from DevEco Studio. |
Use this skill when the user asks to build, package, verify, or locate the output of the HarmonyOS app in this repository.
oh-package.json56.0.2entryassembleAppRun from the current repo root:
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
# Well-known install locations (checked in order)
DEVECO_HVIGORW="/Applications/DevEco-Studio.app/Contents/tools/hvigor/bin/hvigorw"
if [[ -n "${HVIGORW:-}" ]]; then
:
elif command -v hvigorw >/dev/null 2>&1; then
HVIGORW="$(command -v hvigorw)"
elif [[ -x "$DEVECO_HVIGORW" ]]; then
HVIGORW="$DEVECO_HVIGORW"
else
echo "hvigorw not found." >&2
echo " • Install DevEco Studio, or" >&2
echo " • export HVIGORW=/path/to/hvigorw, or" >&2
echo " • add hvigorw to PATH" >&2
exit 1
fi
cd "$REPO_ROOT"
"$HVIGORW" --mode project assembleApp
entry moduleLook for output similar to:
> hvigor Finished ::assembleApp...
> hvigor BUILD SUCCESSFUL
After a successful build, check:
entry/build/default/outputs/default/entry-default-signed.hapentry/build/default/outputs/default/entry-default-unsigned.hapentry/build/default/outputs/default/app/entry/build/default/outputs/default/mapping/entry/build/default/outputs/default/symbol/entry/build/default/outputs/ohosTest/Before building, confirm the tool exists:
[[ -n "${HVIGORW:-}" ]] \
|| command -v hvigorw >/dev/null 2>&1 \
|| [[ -x "/Applications/DevEco-Studio.app/Contents/tools/hvigor/bin/hvigorw" ]]
To inspect tasks:
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
cd "$REPO_ROOT"
DEVECO_HVIGORW="/Applications/DevEco-Studio.app/Contents/tools/hvigor/bin/hvigorw"
if [[ -n "${HVIGORW:-}" ]]; then
:
elif command -v hvigorw >/dev/null 2>&1; then
HVIGORW="$(command -v hvigorw)"
elif [[ -x "$DEVECO_HVIGORW" ]]; then
HVIGORW="$DEVECO_HVIGORW"
else
echo "hvigorw not found; export HVIGORW=/path/to/hvigorw or put it in PATH" >&2
exit 1
fi
"$HVIGORW" tasks
If you see an error like:
In an '@Entry' decorated component, the 'build' method can have only one root node
Make sure the component's build() returns exactly one root container such as Column, Row, or Stack.
.etsThis often means the ArkTS parser encountered invalid component structure, usually from:
build()This repo currently may emit non-blocking warnings such as:
Function may throw exceptionsIf BUILD SUCCESSFUL appears, those warnings do not block packaging.
hvigorw from the current environment first