From 628714b225dbcdc6727d392e63a55177f1d17ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E9=92=9F?= <958460248@qq.com> Date: Fri, 21 Feb 2020 21:36:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README-EN.md | 22 +++++++++++----------- README.md | 21 ++++++++++----------- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/README-EN.md b/README-EN.md index 31c298a..9733938 100644 --- a/README-EN.md +++ b/README-EN.md @@ -100,7 +100,17 @@ implementation 'com.azhon:appupdate:2.8.0' implementation 'com.azhon:appupdateX:2.8.0' ``` -#### Step2:Create `DownloadManager`,For more usage, please see [sample code here](https://github.com/azhon/AppUpdate/blob/master/app/src/main/java/com/azhon/app/MainActivity.java) +#### Step2:Compatible with Android N and above,Add the following code to your app's `build.gradle` + +```java +defaultConfig { + + //Each application has different authorities, preventing the same cannot be installed on the same phone at the same time + resValue "string", "authorities", applicationId +} +``` + +#### Step3:Create `DownloadManager`,For more usage, please see [sample code here](https://github.com/azhon/AppUpdate/blob/master/app/src/main/java/com/azhon/app/MainActivity.java) ```java DownloadManager manager = DownloadManager.getInstance(this); @@ -112,16 +122,6 @@ manager.setApkName("appupdate.apk") .download(); ``` -#### Step3:Compatible with Android N and above,Add the following code to your app's `build.gradle` - -```java -defaultConfig { - - //Each application has different authorities, preventing the same cannot be installed on the same phone at the same time - resValue "string", "authorities", applicationId -} -``` - #### Step4:ProGuard Rules ```groovy diff --git a/README.md b/README.md index 0dbe126..811d35c 100644 --- a/README.md +++ b/README.md @@ -107,8 +107,17 @@ implementation 'com.azhon:appupdate:2.8.0' ```groovy implementation 'com.azhon:appupdateX:2.8.0' ``` +#### 第二步:兼容Android N 及以上版本,在你应用的`build.gradle`添加如下代码 -#### 第二步:创建`DownloadManager`,更多用法请查看[这里示例代码](https://github.com/azhon/AppUpdate/blob/master/app/src/main/java/com/azhon/app/MainActivity.java) +```java +defaultConfig { + + //每个应用拥有不同的authorities,防止相同的在同一个手机上无法同时安装 + resValue "string", "authorities", applicationId +} +``` + +#### 第三步:创建`DownloadManager`,更多用法请查看[这里示例代码](https://github.com/azhon/AppUpdate/blob/master/app/src/main/java/com/azhon/app/MainActivity.java) ```java DownloadManager manager = DownloadManager.getInstance(this); @@ -118,16 +127,6 @@ manager.setApkName("appupdate.apk") .download(); ``` -#### 第三步:兼容Android N 及以上版本,在你应用的`build.gradle`添加如下代码 - -```java -defaultConfig { - - //每个应用拥有不同的authorities,防止相同的在同一个手机上无法同时安装 - resValue "string", "authorities", applicationId -} -``` - #### 第四步:混淆打包,只需保持`Activity`、`Service`不混淆 ```groovy