Meituan-Dianping / walle

Android Signature V2 Scheme签名下的新一代渠道包打包神器
Apache License 2.0
6.77k stars 1.08k forks source link

能和AndResGuard结合使用吗? #76

Closed 401885064 closed 7 years ago

401885064 commented 7 years ago

微信资源压缩 AndResGuard :https://github.com/shwenzhang/AndResGuard

可否在build配置中结合AndResGuard ,以便先使用AndResGuard压缩生成apk后再多渠道打包?

AndResGuard那边Issues

achellies commented 7 years ago

理论上是支持的,你可以先试试,两者不存在兼容性问题,可能7zip压缩会有问题

401885064 commented 7 years ago

今天下午试了 , AndResGuard 生成的XXXX-release_signed_7zip_aligned.apk 再用walle-cli命令方式打多渠道是不行,运行报错:

` at com.meituan.android.walle.PayloadWriter.put(PayloadWriter.java:31) at com.meituan.android.walle.ChannelWriter.putRaw(ChannelWriter.java:73)

  at com.meituan.android.walle.ChannelWriter.put(ChannelWriter.java:55)
  at com.meituan.android.walle.commands.WriteChannelsCommand.generateChann

Apk(WriteChannelsCommand.java:80) at com.meituan.android.walle.commands.WriteChannelsCommand.parse(WriteCh nelsCommand.java:64) at com.meituan.android.walle.Main.main(Main.java:49) m.meituan.android.walle.SignatureNotFoundException: No APK Signing Block befor ZIP Central Directory at com.meituan.android.walle.ApkUtil.findApkSigningBlock(ApkUtil.java:12

  at com.meituan.android.walle.PayloadWriter.handleApkSigningBlock(Payload

iter.java:77) at com.meituan.android.walle.PayloadWriter.putAll(PayloadWriter.java:43)

  at com.meituan.android.walle.PayloadWriter.put(PayloadWriter.java:31)
  at com.meituan.android.walle.ChannelWriter.putRaw(ChannelWriter.java:73)

  at com.meituan.android.walle.ChannelWriter.put(ChannelWriter.java:55)
  at com.meituan.android.walle.commands.WriteChannelsCommand.generateChann

Apk(WriteChannelsCommand.java:80) at com.meituan.android.walle.commands.WriteChannelsCommand.parse(WriteCh nelsCommand.java:64) at com.meituan.android.walle.Main.main(Main.java:49) m.meituan.android.walle.SignatureNotFoundException: No APK Signing Block befor ZIP Central Directory at com.meituan.android.walle.ApkUtil.findApkSigningBlock(ApkUtil.java:12

  at com.meituan.android.walle.PayloadWriter.handleApkSigningBlock(Payload

iter.java:77) at com.meituan.android.walle.PayloadWriter.putAll(PayloadWriter.java:43)

  at com.meituan.android.walle.PayloadWriter.put(PayloadWriter.java:31)
  at com.meituan.android.walle.ChannelWriter.putRaw(ChannelWriter.java:73)

  at com.meituan.android.walle.ChannelWriter.put(ChannelWriter.java:55)
  at com.meituan.android.walle.commands.WriteChannelsCommand.generateChann

Apk(WriteChannelsCommand.java:80) at com.meituan.android.walle.commands.WriteChannelsCommand.parse(WriteCh nelsCommand.java:64) at com.meituan.android.walle.Main.main(Main.java:49) m.meituan.android.walle.SignatureNotFoundException: No APK Signing Block befor ZIP Central Directory at com.meituan.android.walle.ApkUtil.findApkSigningBlock(ApkUtil.java:12

  at com.meituan.android.walle.PayloadWriter.handleApkSigningBlock(Payload

iter.java:77) at com.meituan.android.walle.PayloadWriter.putAll(PayloadWriter.java:43)

  at com.meituan.android.walle.PayloadWriter.put(PayloadWriter.java:31)
  at com.meituan.android.walle.ChannelWriter.putRaw(ChannelWriter.java:73)

`

能做下兼容么?

achellies commented 7 years ago

7zip这没法兼容,本省7zip会把签名信息丢掉的,这个得让AndResGuard在处理7zip压缩时把签名信息保留着,说白点7Zip功能得支持V2签名的包

401885064 commented 7 years ago

额,这样,官宣AndResGuard下个版本会支持V2签名,只能等了! 谢谢哈