From db9bdf12d49ab50397832023766db7214c03508b Mon Sep 17 00:00:00 2001 From: allen2015555 Date: Fri, 19 Oct 2018 16:32:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=B0=8F=E4=BC=98=E5=8C=96?= =?UTF-8?q?=EF=BC=8CminSdkVersion=2014?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/compiler.xml | 22 ------------ .idea/copyright/profiles_settings.xml | 3 -- .idea/inspectionProfiles/Project_Default.xml | 36 ------------------- .idea/misc.xml | 9 ++--- .idea/modules.xml | 1 - app/build.gradle | 2 +- library_update/build.gradle | 4 +-- .../maning/updatelibrary/InstallUtils.java | 5 ++- 8 files changed, 12 insertions(+), 70 deletions(-) delete mode 100644 .idea/compiler.xml delete mode 100644 .idea/copyright/profiles_settings.xml delete mode 100644 .idea/inspectionProfiles/Project_Default.xml diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index 96cc43e..0000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml deleted file mode 100644 index e7bedf3..0000000 --- a/.idea/copyright/profiles_settings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 6560a98..0000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 635999d..99202cc 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -5,11 +5,12 @@ @@ -24,7 +25,7 @@ - + diff --git a/.idea/modules.xml b/.idea/modules.xml index 76d6679..d79db35 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -3,7 +3,6 @@ - diff --git a/app/build.gradle b/app/build.gradle index f3ff193..23a3944 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,7 +6,7 @@ android { defaultConfig { applicationId "com.maning.mnupdateapk" - minSdkVersion 15 + minSdkVersion 14 targetSdkVersion 26 versionCode 1 versionName "1.0" diff --git a/library_update/build.gradle b/library_update/build.gradle index 494b507..a220182 100755 --- a/library_update/build.gradle +++ b/library_update/build.gradle @@ -8,7 +8,7 @@ android { buildToolsVersion "26.0.2" defaultConfig { - minSdkVersion 15 + minSdkVersion 14 targetSdkVersion 26 versionCode 1 versionName "1.0" @@ -27,6 +27,6 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - implementation('com.android.support:appcompat-v7:26.1.0') + implementation 'com.android.support:appcompat-v7:26.1.0' implementation 'com.squareup.okhttp3:okhttp:3.11.0' } diff --git a/library_update/src/main/java/com/maning/updatelibrary/InstallUtils.java b/library_update/src/main/java/com/maning/updatelibrary/InstallUtils.java index a1e2925..3706bc2 100755 --- a/library_update/src/main/java/com/maning/updatelibrary/InstallUtils.java +++ b/library_update/src/main/java/com/maning/updatelibrary/InstallUtils.java @@ -25,7 +25,7 @@ */ public class InstallUtils { - private static final String TAG = "InstallUtils"; + private static final String TAG = InstallUtils.class.getSimpleName(); private static InstallUtils mInstance; private static Context mContext; @@ -138,6 +138,9 @@ public void startDownload() { if (TextUtils.isEmpty(filePath)) { filePath = MNUtils.getCachePath(mContext) + "/update.apk"; } + //文件权限处理 + MNUtils.changeApkFileMode(new File(filePath)); + //下载 DownloadFileUtils.with() .downloadPath(filePath) .url(httpUrl)