Merge pull request #5754 from ByteHamster/multidex

Enable MultiDex
This commit is contained in:
ByteHamster 2022-02-26 19:43:40 +01:00 committed by GitHub
commit 0d7555da8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 9 deletions

View File

@ -129,6 +129,7 @@ dependencies {
implementation "androidx.fragment:fragment:$fragmentVersion" implementation "androidx.fragment:fragment:$fragmentVersion"
implementation 'androidx.gridlayout:gridlayout:1.0.0' implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation "androidx.media:media:$mediaVersion" implementation "androidx.media:media:$mediaVersion"
implementation 'com.android.support:multidex:2.0.1'
implementation "androidx.palette:palette:$paletteVersion" implementation "androidx.palette:palette:$paletteVersion"
implementation "androidx.preference:preference:$preferenceVersion" implementation "androidx.preference:preference:$preferenceVersion"
implementation "androidx.recyclerview:recyclerview:$recyclerViewVersion" implementation "androidx.recyclerview:recyclerview:$recyclerViewVersion"

View File

@ -1,10 +1,10 @@
package de.danoeh.antennapod; package de.danoeh.antennapod;
import android.app.Application;
import android.content.ComponentName; import android.content.ComponentName;
import android.content.Intent; import android.content.Intent;
import android.os.StrictMode; import android.os.StrictMode;
import androidx.multidex.MultiDexApplication;
import com.joanzapata.iconify.Iconify; import com.joanzapata.iconify.Iconify;
import com.joanzapata.iconify.fonts.FontAwesomeModule; import com.joanzapata.iconify.fonts.FontAwesomeModule;
import com.joanzapata.iconify.fonts.MaterialModule; import com.joanzapata.iconify.fonts.MaterialModule;
@ -18,7 +18,7 @@ import de.danoeh.antennapod.spa.SPAUtil;
import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
/** Main application class. */ /** Main application class. */
public class PodcastApp extends Application { public class PodcastApp extends MultiDexApplication {
// make sure that ClientConfigurator executes its static code // make sure that ClientConfigurator executes its static code
static { static {

View File

@ -5,7 +5,7 @@ android {
minSdk 19 minSdk 19
targetSdk 30 targetSdk 30
multiDexEnabled false multiDexEnabled true
vectorDrawables.useSupportLibrary true vectorDrawables.useSupportLibrary true
vectorDrawables.generatedDensities = [] vectorDrawables.generatedDensities = []
@ -18,12 +18,6 @@ android {
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard.cfg" proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard.cfg"
} }
debug { debug {
// debug build has method count over 64k single-dex threshold.
// For building debug build to use on Android < 21 (pre-Android 5) devices,
// you need to manually change class
// de.danoeh.antennapod.PodcastApp to extend MultiDexApplication .
// See Issue #2813
multiDexEnabled true
} }
} }