From b5d478b7c9cbc91deabd03c28e7ad2baad8cbb90 Mon Sep 17 00:00:00 2001 From: Ammar Githam Date: Mon, 21 Sep 2020 21:02:18 +0900 Subject: [PATCH 1/2] Bump minSdkVersion to 21, and remove MultidexApplication (see description) For multidex in api 21 and higher, extending from MultidexApplication is not required. Check: https://developer.android.com/studio/build/multidex#mdex-on-l --- app/build.gradle | 2 +- .../java/awais/instagrabber/InstaGrabberApplication.java | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 5401cbe4..8cc42752 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,7 +7,7 @@ android { defaultConfig { applicationId 'me.austinhuang.instagrabbr' - minSdkVersion 16 + minSdkVersion 21 targetSdkVersion 29 versionCode 51 diff --git a/app/src/main/java/awais/instagrabber/InstaGrabberApplication.java b/app/src/main/java/awais/instagrabber/InstaGrabberApplication.java index dbff1a60..827db5ea 100644 --- a/app/src/main/java/awais/instagrabber/InstaGrabberApplication.java +++ b/app/src/main/java/awais/instagrabber/InstaGrabberApplication.java @@ -1,11 +1,10 @@ package awais.instagrabber; +import android.app.Application; import android.content.ClipboardManager; import android.content.Context; import android.util.Log; -import androidx.multidex.MultiDexApplication; - import com.facebook.drawee.backends.pipeline.Fresco; import com.facebook.imagepipeline.core.ImagePipelineConfig; @@ -27,7 +26,7 @@ import static awais.instagrabber.utils.Utils.datetimeParser; import static awais.instagrabber.utils.Utils.logCollector; import static awais.instagrabber.utils.Utils.settingsHelper; -public final class InstaGrabberApplication extends MultiDexApplication { +public final class InstaGrabberApplication extends Application { private static final String TAG = "InstaGrabberApplication"; @Override From cbc7e5447f40a05487d8800e8b6b5c33c446c698 Mon Sep 17 00:00:00 2001 From: Ammar Githam Date: Mon, 21 Sep 2020 21:08:14 +0900 Subject: [PATCH 2/2] Removing StorageUtil lib for the timebeing --- app/build.gradle | 2 +- .../java/awais/instagrabber/activities/MainActivity.java | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 8cc42752..3fa4bc3f 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -54,7 +54,7 @@ dependencies { implementation "androidx.constraintlayout:constraintlayout:2.0.1" implementation "androidx.preference:preference:$preference_version" - implementation 'com.github.hendrawd:StorageUtil:1.1.0' +// implementation 'com.github.hendrawd:StorageUtil:1.1.0' implementation 'org.jsoup:jsoup:1.13.1' implementation 'com.facebook.fresco:fresco:2.3.0' diff --git a/app/src/main/java/awais/instagrabber/activities/MainActivity.java b/app/src/main/java/awais/instagrabber/activities/MainActivity.java index edecf50a..79439bdc 100644 --- a/app/src/main/java/awais/instagrabber/activities/MainActivity.java +++ b/app/src/main/java/awais/instagrabber/activities/MainActivity.java @@ -39,9 +39,7 @@ import androidx.navigation.ui.NavigationUI; import com.google.android.material.appbar.AppBarLayout; import com.google.android.material.appbar.CollapsingToolbarLayout; import com.google.android.material.bottomnavigation.BottomNavigationView; -import hendrawd.storageutil.library.StorageUtil; -import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -160,9 +158,9 @@ public class MainActivity extends BaseLanguageActivity implements FragmentManage } getSupportFragmentManager().addOnBackStackChangedListener(this); - Log.d("austin_debug", "dir: "+Arrays.toString(StorageUtil.getStorageDirectories(getApplicationContext()))); - final File sdcard = new File(StorageUtil.getStorageDirectories(getApplicationContext())[0]); - Log.d("austin_debug", "files: "+Arrays.toString(sdcard.listFiles())); + // Log.d("austin_debug", "dir: "+Arrays.toString(StorageUtil.getStorageDirectories(getApplicationContext()))); + // final File sdcard = new File(StorageUtil.getStorageDirectories(getApplicationContext())[0]); + // Log.d("austin_debug", "files: "+Arrays.toString(sdcard.listFiles())); } @Override