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

[fix] fix Could not decode arsc file build error (#450) #516

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

linsir6
Copy link

@linsir6 linsir6 commented Nov 12, 2022

fix build error, when app open aapt custom packageId(--package-id) feature

open custom packageId:

aaptOptions {
        additionalParameters '--allow-reserved-package-id','--package-id','0x15'
}

stacktrace:

com.tencent.mm.androlib.AndrolibException: Could not decode arsc file
  at com.tencent.mm.androlib.res.decoder.ARSCDecoder.write(ARSCDecoder.java:131)
  at com.tencent.mm.androlib.ApkDecoder.decode(ApkDecoder.java:197)
  at com.tencent.mm.resourceproguard.Main.decodeResource(Main.java:114)
  at com.tencent.mm.resourceproguard.Main.resourceProguard(Main.java:98)
  at com.tencent.mm.resourceproguard.Main.resourceProguard(Main.java:84)
  at com.tencent.mm.resourceproguard.cli.CliMain.run(CliMain.java:243)
  at com.tencent.mm.resourceproguard.cli.CliMain.main(CliMain.java:38)
Caused by: java.io.EOFException
  at java.base/java.io.DataInputStream.readFully(DataInputStream.java:202)
  at com.mindprod.ledatastream.LEDataInputStream.readFully(LEDataInputStream.java:180)

cause:
when app open custom packageId, aapt generates more content when generating arsc file than not open custom packageId, so we need read it , and write it to new arsc file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant