Slow application since I put multiDex on Android

1

my application takes a long time to start since I put multiDexEnabled true in gradle module as well as compile 'com.android.support:multidex:1.0.0' before it did not take so long that my application started and as I use the maps activity I need to use this. Someone to tell me what I can do in these cases.

  

current gradle

apply plugin: 'com.android.application'

android {

compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
    applicationId "desarrolladoresalpha.hassmovilcortes"
    minSdkVersion 15
    targetSdkVersion 25
    multiDexEnabled true
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile files('libs/GenAsync.jar')
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.mcxiaoke.volley:library:1.0.18'
compile 'com.google.android.gms:play-services:10.0.1'
testCompile 'junit:junit:4.12'
compile 'com.android.support:multidex:1.0.0'
}
    
asked by DoubleM 05.01.2017 в 00:07
source

1 answer

2

If you only use the play services of maps, you should not load the whole pack

In the following link you can obtain each service separately split-play-services

compile 'com.google.android.gms:play-services-maps:10.0.1'

and then you can select from multi-dex

    
answered by 13.01.2017 в 12:29