From e8a1e015d4785fd5f56cd71f06f86769708daa18 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 28 Sep 2020 21:21:16 -0700 Subject: [PATCH] Enable multidex --- app/build.gradle | 11 +++++++++++ .../main/java/org/traccar/client/MainApplication.java | 7 ++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 2f0f45ea..147c2f4b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,6 +10,16 @@ android { targetSdkVersion 29 versionCode 65 versionName '6.4' + multiDexEnabled true + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + packagingOptions { + exclude 'META-INF/DEPENDENCIES' } lintOptions { @@ -37,6 +47,7 @@ android { dependencies { implementation 'com.google.android.material:material:1.3.0-alpha02' + implementation 'androidx.multidex:multidex:2.0.1' implementation 'androidx.preference:preference:1.1.1' testImplementation 'junit:junit:4.13' testImplementation 'org.robolectric:robolectric:4.1' diff --git a/app/src/main/java/org/traccar/client/MainApplication.java b/app/src/main/java/org/traccar/client/MainApplication.java index 7f4447f6..a864aba6 100644 --- a/app/src/main/java/org/traccar/client/MainApplication.java +++ b/app/src/main/java/org/traccar/client/MainApplication.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 - 2017 Anton Tananaev (anton@traccar.org) + * Copyright 2016 - 2020 Anton Tananaev (anton@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ package org.traccar.client; import android.annotation.TargetApi; -import android.app.Application; import android.app.Notification; import android.app.NotificationChannel; import android.app.NotificationManager; @@ -27,7 +26,9 @@ import android.os.Build; import android.preference.PreferenceManager; -public class MainApplication extends Application { +import androidx.multidex.MultiDexApplication; + +public class MainApplication extends MultiDexApplication { public static final String PRIMARY_CHANNEL = "default";