Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AGP 7.2.2 生成的aab包用bundletool转apks失败,希望大佬能适配下 #95

Open
Jiang00 opened this issue Jul 11, 2023 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@Jiang00
Copy link

Jiang00 commented Jul 11, 2023

classpath "com.bytedance.android:aabresguard-plugin:0.1.10"
Gradle Version 7.4.2
Gradle Plugin Version 7.2.2

报错如下

/var/folders/lm/ymj2vhj91_79yntpgg98h8r40000gn/T/9326926774270237465/proto.apk: error: failed to deserialize resources.pb: unknown type 'macro'.
/var/folders/lm/ymj2vhj91_79yntpgg98h8r40000gn/T/9326926774270237465/proto.apk: error: failed to load APK.
[BT:1.3.0] Error: Command '[/var/folders/lm/ymj2vhj91_79yntpgg98h8r40000gn/T/AutoValue_BuildApksCommand2510183443234070461/output/macos/aapt2, convert, --output-format, binary, -o, /var/folders/lm/ymj2vhj91_79yntpgg98h8r40000gn/T/9326926774270237465/binary.apk, /var/folders/lm/ymj2vhj91_79yntpgg98h8r40000gn/T/9326926774270237465/proto.apk]' didn't terminate successfully (exit code: 1). Check the logs.
com.android.tools.build.bundletool.model.exceptions.CommandExecutionException: Command '[/var/folders/lm/ymj2vhj91_79yntpgg98h8r40000gn/T/AutoValue_BuildApksCommand2510183443234070461/output/macos/aapt2, convert, --output-format, binary, -o, /var/folders/lm/ymj2vhj91_79yntpgg98h8r40000gn/T/9326926774270237465/binary.apk, /var/folders/lm/ymj2vhj91_79yntpgg98h8r40000gn/T/9326926774270237465/proto.apk]' didn't terminate successfully (exit code: 1). Check the logs.
at com.android.tools.build.bundletool.model.exceptions.InternalExceptionBuilder.build(InternalExceptionBuilder.java:57)
at com.android.tools.build.bundletool.model.DefaultCommandExecutor.executeImpl(DefaultCommandExecutor.java:57)
at com.android.tools.build.bundletool.model.DefaultCommandExecutor.execute(DefaultCommandExecutor.java:33)
at com.android.tools.build.bundletool.model.Aapt2Command$1.convertApkProtoToBinary(Aapt2Command.java:41)
at com.android.tools.build.bundletool.io.ApkzlibApkSerializerHelper.writeToZipFile(ApkzlibApkSerializerHelper.java:122)
at com.android.tools.build.bundletool.io.ApkzlibApkSerializerHelper.writeToZipFile(ApkzlibApkSerializerHelper.java:101)
at com.android.tools.build.bundletool.io.SplitApkSerializer.writeToDisk(SplitApkSerializer.java:68)
at com.android.tools.build.bundletool.io.SplitApkSerializer.writeSplitToDisk(SplitApkSerializer.java:42)
at com.android.tools.build.bundletool.io.ApkSetBuilderFactory$ApkSetArchiveBuilder.addSplitApk(ApkSetBuilderFactory.java:106)
at com.android.tools.build.bundletool.io.ApkSerializerManager$ApkSerializer.serialize(ApkSerializerManager.java:444)
at com.android.tools.build.bundletool.io.ApkSerializerManager.lambda$null$3(ApkSerializerManager.java:221)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:117)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:38)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:77)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:832)

@Jiang00 Jiang00 added the bug Something isn't working label Jul 11, 2023
@NeptuneCoder
Copy link

i这个是依赖的库版本导致的。

@Jiang00
Copy link
Author

Jiang00 commented Jul 13, 2023

@NeptuneCoder 确实是依赖库有冲突,我把material库版本降到1.5.0就可以了。目前只能这样,还是希望大佬能抽空适配下高版本

@NeptuneCoder
Copy link

NeptuneCoder commented Jul 13, 2023 via email

@390057892
Copy link

+1 大佬有空适配下吧

@LinMingkui
Copy link

+1

@xeemoo
Copy link

xeemoo commented May 11, 2024

是BundleTool以及aapt2版本太低导致的,修改代码升级bundletool版本即可

@fanqGithub
Copy link

是BundleTool以及aapt2版本太低导致的,修改代码升级bundletool版本即可

大佬有修改的版本吗?我也想升级和修改来着,clone下来发现一些依赖都没法成功下来😂,一堆报红

@xeemoo
Copy link

xeemoo commented Aug 19, 2024

是BundleTool以及aapt2版本太低导致的,修改代码升级bundletool版本即可

大佬有修改的版本吗?我也想升级和修改来着,clone下来发现一些依赖都没法成功下来😂,一堆报红

@fanqGithub 我改了一个

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants