From 7096beb16854588258781bbeb7fc8b90aa234813 Mon Sep 17 00:00:00 2001 From: Sim Sun Date: Mon, 26 Feb 2018 10:41:47 -0800 Subject: [PATCH] docs(readme): add best practise notes in readme --- README.md | 7 ++++++- README.zh-cn.md | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 287f0506..57bbecf6 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,6 @@ andResGuard { "*.jpg", "*.jpeg", "*.gif", - "resources.arsc" ] sevenzip { artifact = 'com.tencent.mm:SevenZip:1.2.11' @@ -119,6 +118,12 @@ res path mapping: 1. The first element of list which returned by `AssetManager#list(String path)` is empty string when you're using the APK which is compressed by 7zip. [#162](https://github.com/shwenzhang/AndResGuard/issues/162) +## Best Practise + +1. Do **NOT** add `resource.asrc` into `compressFilePattern` unless the app size is really matter to you.(#84 #233) +2. Do **NOT** enable 7zip compression(`use7zip`) when you distribute your APP on Google Play. It'll prevent the file-by-file patch when updating your APP(#233) + + ## Thanks [Apktool](https://github.com/iBotPeaches/Apktool) Connor Tumbleson diff --git a/README.zh-cn.md b/README.zh-cn.md index 2a8a7579..1e1b786d 100644 --- a/README.zh-cn.md +++ b/README.zh-cn.md @@ -55,7 +55,6 @@ andResGuard { "*.jpg", "*.jpeg", "*.gif", - "resources.arsc" ] sevenzip { artifact = 'com.tencent.mm:SevenZip:1.2.11' @@ -111,6 +110,12 @@ res path mapping: 1. 当时在使用7zip压缩的APK时,调用`AssetManager#list(String path)`返回结果的首个元素为空字符串. [#162](https://github.com/shwenzhang/AndResGuard/issues/162) +## 最佳实践 + +1. 如果不是对APK size有极致的需求,请不要把`resource.asrc`添加进`compressFilePattern` (#84 #233) +2. 对于发布于Google Play的APP,建议不要使用7Zip压缩,因为这个会导致Google Play的优化Patch算法失效(#233) + + ## 致谢 [Apktool](https://github.com/iBotPeaches/Apktool) 使用了Apktool资源解码部分的代码