diff --git a/app/build.gradle b/app/build.gradle index 973e20e6b..9079e645e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -16,6 +16,8 @@ android { versionCode 955 versionName "0.20.1" + multiDexEnabled true + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true @@ -28,7 +30,6 @@ android { buildTypes { debug { - multiDexEnabled true debuggable true // suffix the app id and the app name with git branch name @@ -157,7 +158,7 @@ dependencies { debugImplementation "com.squareup.leakcanary:leakcanary-android:${leakCanaryVersion}" implementation "com.squareup.leakcanary:leakcanary-object-watcher-android:${leakCanaryVersion}" - debugImplementation "androidx.multidex:multidex:2.0.1" + implementation "androidx.multidex:multidex:2.0.1" testImplementation 'junit:junit:4.13.1' testImplementation 'org.mockito:mockito-core:3.3.3' diff --git a/app/src/debug/java/org/schabi/newpipe/DebugApp.kt b/app/src/debug/java/org/schabi/newpipe/DebugApp.kt index 9ea3bdabe..3ace75f0b 100644 --- a/app/src/debug/java/org/schabi/newpipe/DebugApp.kt +++ b/app/src/debug/java/org/schabi/newpipe/DebugApp.kt @@ -1,6 +1,5 @@ package org.schabi.newpipe -import androidx.multidex.MultiDex import androidx.preference.PreferenceManager import com.facebook.stetho.Stetho import com.facebook.stetho.okhttp3.StethoInterceptor @@ -28,12 +27,6 @@ class DebugApp : App() { return downloader } - override fun initACRA() { - // install MultiDex before initializing ACRA - MultiDex.install(this) - super.initACRA() - } - private fun initStetho() { // Create an InitializerBuilder val initializerBuilder = Stetho.newInitializerBuilder(this) diff --git a/app/src/main/java/org/schabi/newpipe/App.java b/app/src/main/java/org/schabi/newpipe/App.java index 4b2a858c7..a94acda8e 100644 --- a/app/src/main/java/org/schabi/newpipe/App.java +++ b/app/src/main/java/org/schabi/newpipe/App.java @@ -1,6 +1,5 @@ package org.schabi.newpipe; -import android.app.Application; import android.app.NotificationChannel; import android.app.NotificationManager; import android.content.Context; @@ -9,6 +8,7 @@ import android.os.Build; import android.util.Log; import androidx.annotation.NonNull; +import androidx.multidex.MultiDexApplication; import androidx.preference.PreferenceManager; import com.nostra13.universalimageloader.cache.memory.impl.LRULimitedMemoryCache; @@ -61,7 +61,7 @@ import io.reactivex.plugins.RxJavaPlugins; * along with NewPipe. If not, see . */ -public class App extends Application { +public class App extends MultiDexApplication { protected static final String TAG = App.class.toString(); private static App app;