普通人6
普通人6
  • 发布:2021-07-14 17:57
  • 更新:2021-09-16 11:21
  • 阅读:761

【报Bug】uni 本地打包报错

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: Win7

HBuilderX类型: 正式

HBuilderX版本号: 3.1.22

手机系统: Android

手机系统版本号: Android 11

手机厂商: 小米

手机机型: mi10

页面类型: vue

打包方式: 离线

项目创建方式: HBuilderX

示例代码:

[Info] 正在制作apk安装包...

[Info] I: Using Apktool 2.4.1 on UNI.com.qh.jkt_cm.apk
[Info] I: Loading resource table...
[Info] I: Decoding AndroidManifest.xml with resources...
[Info] I: Loading resource table from file: C:\Users\Administrator\AppData\Local\apktool\framework\1.apk
[Info] I: Regular manifest package...
[Info] I: Decoding file-resources...
[Info] I: Decoding values / XMLs...
[Info] I: Copying raw classes.dex file...
[Info] I: Copying raw classes2.dex file...
[Info] I: Copying raw assets/39285EFA.dex file...
[Info] I: Copying assets and libs...
[Info] I: Copying unknown files...
[Info] I: Copying original files...
[Info] begin replace files to apk...
[Info] begin copy file[D:/phpStudy/PHPTutorial/jingjiren/app_code/unpackage/cache/wgt/UNI.com.qh.jkt/.manifest/icon-android-hdpi.png] to [C:/Users/Administrator/AppData/Local/HBuilder X/UNI.com.qh.jkt/packge_cache/NONE/UNI.com.qh.jkt_cm/res/drawable-hdpi/icon.png]...
[Info] copy file[D:/phpStudy/PHPTutorial/jingjiren/app_code/unpackage/cache/wgt/UNI.com.qh.jkt/.manifest/icon-android-hdpi.png] to [C:/Users/Administrator/AppData/Local/HBuilder X/UNI.com.qh.jkt/packge_cache/NONE/UNI.com.qh.jkt_cm/res/drawable-hdpi/icon.png] success.
[Info] begin copy file[D:/phpStudy/PHPTutorial/jingjiren/app_code/unpackage/cache/wgt/UNI.com.qh.jkt/.manifest/icon-android-xhdpi.png] to [C:/Users/Administrator/AppData/Local/HBuilder X/UNI.com.qh.jkt/packge_cache/NONE/UNI.com.qh.jkt_cm/res/drawable-xhdpi/icon.png]...
[Info] copy file[D:/phpStudy/PHPTutorial/jingjiren/app_code/unpackage/cache/wgt/UNI.com.qh.jkt/.manifest/icon-android-xhdpi.png] to [C:/Users/Administrator/AppData/Local/HBuilder X/UNI.com.qh.jkt/packge_cache/NONE/UNI.com.qh.jkt_cm/res/drawable-xhdpi/icon.png] success.
[Info] begin copy file[D:/phpStudy/PHPTutorial/jingjiren/app_code/unpackage/cache/wgt/UNI.com.qh.jkt/.manifest/icon-android-xxhdpi.png] to [C:/Users/Administrator/AppData/Local/HBuilder X/UNI.com.qh.jkt/packge_cache/NONE/UNI.com.qh.jkt_cm/res/drawable-xxhdpi/icon.png]...
[Info] copy file[D:/phpStudy/PHPTutorial/jingjiren/app_code/unpackage/cache/wgt/UNI.com.qh.jkt/.manifest/icon-android-xxhdpi.png] to [C:/Users/Administrator/AppData/Local/HBuilder X/UNI.com.qh.jkt/packge_cache/NONE/UNI.com.qh.jkt_cm/res/drawable-xxhdpi/icon.png] success.
[Info] begin copy file[D:/phpStudy/PHPTutorial/jingjiren/app_code/unpackage/cache/wgt/UNI.com.qh.jkt/.manifest/icon-android-xxxhdpi.png] to [C:/Users/Administrator/AppData/Local/HBuilder X/UNI.com.qh.jkt/packge_cache/NONE/UNI.com.qh.jkt_cm/res/drawable-xxxhdpi/icon.png]...
[Info] copy file[D:/phpStudy/PHPTutorial/jingjiren/app_code/unpackage/cache/wgt/UNI.com.qh.jkt/.manifest/icon-android-xxxhdpi.png] to [C:/Users/Administrator/AppData/Local/HBuilder X/UNI.com.qh.jkt/packge_cache/NONE/UNI.com.qh.jkt_cm/res/drawable-xxxhdpi/icon.png] success.
[Info] begin copy file[D:/phpStudy/PHPTutorial/jingjiren/app_code/unpackage/cache/wgt/UNI.com.qh.jkt/.manifest/splash-android-hdpi.9.png] to [C:/Users/Administrator/AppData/Local/HBuilder X/UNI.com.qh.jkt/packge_cache/NONE/UNI.com.qh.jkt_cm/res/drawable-hdpi/splash.9.png]...
[Info] copy file[D:/phpStudy/PHPTutorial/jingjiren/app_code/unpackage/cache/wgt/UNI.com.qh.jkt/.manifest/splash-android-hdpi.9.png] to [C:/Users/Administrator/AppData/Local/HBuilder X/UNI.com.qh.jkt/packge_cache/NONE/UNI.com.qh.jkt_cm/res/drawable-hdpi/splash.9.png] success.
[Info] begin copy file[D:/phpStudy/PHPTutorial/jingjiren/app_code/unpackage/cache/wgt/UNI.com.qh.jkt/.manifest/splash-android-xhdpi.9.png] to [C:/Users/Administrator/AppData/Local/HBuilder X/UNI.com.qh.jkt/packge_cache/NONE/UNI.com.qh.jkt_cm/res/drawable-xhdpi/splash.9.png]...
[Info] copy file[D:/phpStudy/PHPTutorial/jingjiren/app_code/unpackage/cache/wgt/UNI.com.qh.jkt/.manifest/splash-android-xhdpi.9.png] to [C:/Users/Administrator/AppData/Local/HBuilder X/UNI.com.qh.jkt/packge_cache/NONE/UNI.com.qh.jkt_cm/res/drawable-xhdpi/splash.9.png] success.
[Info] begin copy file[D:/phpStudy/PHPTutorial/jingjiren/app_code/unpackage/cache/wgt/UNI.com.qh.jkt/.manifest/splash-android-xxhdpi.9.png] to [C:/Users/Administrator/AppData/Local/HBuilder X/UNI.com.qh.jkt/packge_cache/NONE/UNI.com.qh.jkt_cm/res/drawable-xxhdpi/splash.9.png]...
[Info] copy file[D:/phpStudy/PHPTutorial/jingjiren/app_code/unpackage/cache/wgt/UNI.com.qh.jkt/.manifest/splash-android-xxhdpi.9.png] to [C:/Users/Administrator/AppData/Local/HBuilder X/UNI.com.qh.jkt/packge_cache/NONE/UNI.com.qh.jkt_cm/res/drawable-xxhdpi/splash.9.png] success.
[Info] begin update files to apk...
[Info] I: Using Apktool 2.4.1
[Info] I: Copying C:\Users\Administrator\AppData\Local\HBuilder X__UNI.com.qh.jkt\packge_cache__NONE__UNI.com.qh.jkt_cm classes.dex file...
[Info] I: Copying C:\Users\Administrator\AppData\Local\HBuilder X__UNI.com.qh.jkt\packge_cache__NONE__UNI.com.qh.jkt_cm classes2.dex file...
[Info] I: Checking whether resources has changed...
[Info] I: Building resources...
[Error] W: ERROR: 9-patch image C:\Users\Administrator\AppData\Local\HBuilder X__UNI.com.qh.jkt\packge_cache__NONE__UNI.com.qh.jkt_cm\res\drawable-hdpi\splash.9.png malformed.
[Error] W: No marked region found along edge.
[Error] W: Found along top edge.
[Error] W: ERROR: Failure processing PNG image C:\Users\Administrator\AppData\Local\HBuilder X__UNI.com.qh.jkt\packge_cache__NONE__UNI__.com.qh.jkt_cm\res\drawable-hdpi\splash.9.png
[Error] W: ERROR: 9-patch image C:\Users\Administrator\AppData\Local\HBuilder X\
UNI__.com.qh.jkt\packge_cache\
NONE\UNI__.com.qh.jkt_cm\res\drawable-xxhdpi\splash.9.png malformed.
[Error] W: No marked region found along edge.
[Error] W: Found along top edge.
[Error] W: ERROR: Failure processing PNG image C:\Users\Administrator\AppData\Local\HBuilder X\
UNI__.com.qh.jkt\packge_cache\
NONE\UNI__.com.qh.jkt_cm\res\drawable-xxhdpi\splash.9.png
[Error] W: ERROR: 9-patch image C:\Users\Administrator\AppData\Local\HBuilder X\
UNI__.com.qh.jkt\packge_cache\
NONE\UNI__.com.qh.jkt_cm\res\drawable-xhdpi\splash.9.png malformed.
[Error] W: No marked region found along edge.
[Error] W: Found along top edge.
[Error] W: ERROR: Failure processing PNG image C:\Users\Administrator\AppData\Local\HBuilder X\
UNI__.com.qh.jkt\packge_cache\
NONE\UNI.com.qh.jkt_cm\res\drawable-xhdpi\splash.9.png
[Error] brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\ADMINI~1\AppData\Local\Temp\brut_util_Jar_6686695444426494182.tmp, p, --forced-package-id, 127, --min-sdk-version, 19, --target-sdk-version, 26, --version-code, 1010, --version-name, 1.0.10, --no-version-vectors, -F, C:\Users\ADMINI~1\AppData\Local\Temp\APKTOOL4345169634358724739.tmp, -e, C:\Users\ADMINI~1\AppData\Local\Temp\APKTOOL4053571603861786691.tmp, -0, arsc, -I, C:\Users\Administrator\AppData\Local\apktool\framework\1.apk, -S, C:\Users\Administrator\AppData\Local\HBuilder X\
UNI__.com.qh.jkt\packge_cache\
NONE\UNI__.com.qh.jkt_cm\res, -M, C:\Users\Administrator\AppData\Local\HBuilder X\
UNI__.com.qh.jkt\packge_cache\
NONE\UNI__.com.qh.jkt_cm\AndroidManifest.xml]
[Error] Apk tool compile package to apk failed
[Error] 制作结果:Failed. Reason:

操作步骤:

本地打包uni-app

预期结果:

本地打包成功

实际结果:

本地打包失败

bug描述:

本地打包时报错

2021-07-14 17:57 负责人:无 分享
已邀请:
1787624543

1787624543

解决了吗

  • 普通人6 (作者)

    没有,最后用的云打包

    2021-10-13 10:42

  • 1787624543

    回复 普通人6: 我是切换到上一个版本解决了这个问题,把编译器

    2021-10-13 15:45

该问题目前已经被锁定, 无法添加新回复