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

阅读量0
0
0
在原子化服务开发过程中,打包成.app文件经常会遇到一个问题。估计大家也经常遇到。我们将解决方法共享。
15:58:23: Executing task 'signReleaseApp --parallel'...
Executing tasks: [signReleaseApp] in project F:A_workprojectBailianCard
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.
28 actionable tasks: 28 executed
15:59:53: Task execution finished 'signReleaseApp --parallel'.
删除快照之后重新打包便成功,重新打开项目再次加入快照进行打包就可以正常打包。
附件:

回帖

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容图片侵权或者其他问题,请联系本站作侵删。 侵权投诉
链接复制成功,分享给好友