HarmonyOS服务卡片开发-打包问题记录与解决

鸿蒙时代
发布于 2021-10-19 09:30
浏览
1收藏

在原子化服务开发过程中,打包成.app文件经常会遇到一个问题。估计大家也经常遇到。我们将解决方法共享。

15:58:23: Executing task ‘signReleaseApp --parallel’…

Executing tasks: [signReleaseApp] in project F:\A_work\project\BailianCard

Starting Gradle Daemon…
Gradle Daemon started in 6 s 948 ms

Task :preBuild
Task :validateReleaseAppSigning
Task :entry:preBuild
Task :entry:mergeReleaseJavaResource
Task :entry:compileReleaseIdl NO-SOURCE
Task :entry:mergeReleaseResources
Task :entry:mergeReleaseProfile
Task :entry:compileReleaseResources
Task :entry:compileReleaseRFile
Task :entry:generateReleaseBuildConfig
Task :entry:packageReleaseRClass
Task :entry:compileReleaseJavaWithJavac
Task :entry:generateReleaseJsManifest
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Task :entry:compileReleaseJsWithNode
Task :entry:processReleaseLibsFile
Task :entry:generateReleaseShell
Task :entry:processReleaseShellManifest
Task :entry:compileReleaseShellResources
Task :entry:linkReleaseShellResources
Task :entry:compileReleaseShellJavaWithJavac
Task :entry:transformReleaseShellClasses
Task :entry:packageReleaseShell
Task :entry:packageReleaseSimplifyShell
Task :entry:validateReleaseSigning
Task :entry:signReleaseShell
Task :entry:replaceReleaseLegacy
Task :entry:transformReleaseClasses
Task :entry:packageReleaseHap
十月 14, 2021 3:59:53 下午 com.huawei.ohos.Log error
警告: HarmonyOS BundleTool [Error]: isPicturing: the name is not same as formName, name: widget is not in [wkwidget]
十月 14, 2021 3:59:53 下午 com.huawei.ohos.Log error
警告: HarmonyOS BundleTool [Error]: Compressor::compressProcess Compress pack.res failed, Invalid resource file name: widget-2x2.png, correct format example is formName-2x2.png
十月 14, 2021 3:59:53 下午 com.huawei.ohos.Log error
警告: HarmonyOS BundleTool [Error]: Compressor::compressProcess Bundle exception
十月 14, 2021 3:59:53 下午 com.huawei.ohos.Log error
警告: HarmonyOS BundleTool [Error]: Compressor::compressProcess compress failed!
十月 14, 2021 3:59:53 下午 com.huawei.ohos.Log error
警告: HarmonyOS BundleTool [Error]: CompressEntrance::main exit, compress failed
Task :packageReleaseApp FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:packageReleaseApp’.

package pack.res failed

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1m 29s

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings
28 actionable tasks: 28 executed
15:59:53: Task execution finished ‘signReleaseApp --parallel’.
删除快照之后重新打包便成功,重新打开项目再次加入快照进行打包就可以正常打包。

标签
HarmonyOS服务卡片开发-打包问题记录与解决.docx 14.7K 34次下载
3
收藏 1
回复
举报
1条回复
按时间正序
/
按时间倒序
wx62b30ca29e791
wx62b30ca29e791

package pack.res failed 这个错误解决方案,删除快照是啥意思啊

 

回复
2022-6-22 20:37:05
回复
    相关推荐