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 12次下载
2
收藏 1
回复
举报
回复
添加资源
添加资源将有机会获得更多曝光,你也可以直接关联已上传资源 去关联
    相关推荐