From 727cd08b981405e2638d3cee9adff535490895cc Mon Sep 17 00:00:00 2001 From: Jenly Date: Mon, 26 Apr 2021 13:38:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app-updater/build.gradle | 4 ++-- .../src/main/java/com/king/app/updater/util/AppUtils.java | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app-updater/build.gradle b/app-updater/build.gradle index 39dc8dd..2cfaaf7 100644 --- a/app-updater/build.gradle +++ b/app-updater/build.gradle @@ -35,8 +35,8 @@ dependencies { testImplementation deps.test.junit androidTestImplementation deps.test.runner androidTestImplementation deps.test.espresso - //support - compileOnly deps.support.appcompat + //androidx + compileOnly deps.androidx.appcompat compileOnly deps.okhttp } diff --git a/app-updater/src/main/java/com/king/app/updater/util/AppUtils.java b/app-updater/src/main/java/com/king/app/updater/util/AppUtils.java index 2551936..9068454 100644 --- a/app-updater/src/main/java/com/king/app/updater/util/AppUtils.java +++ b/app-updater/src/main/java/com/king/app/updater/util/AppUtils.java @@ -48,7 +48,9 @@ public final class AppUtils { if(TextUtils.isEmpty(filename)){ filename = defaultName; } - + if(filename.endsWith(".apk")){ + return filename; + } return String.format("%s.apk",filename); }