app:preDexDebug花了很多时间

时间:2016-01-10 23:32:02

标签: android android-studio android-studio-2.0

我使用的是Android Studio 1.5版。构建apk需要花费大量时间(大约10-15分钟)。我在Windows 8.0中运行工作室,具有4GB RAM和500GB硬盘空间。 这是app的build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.0"

    defaultConfig {
        applicationId "com.example.example"
        minSdkVersion 14
        targetSdkVersion 22
        versionCode 6
        versionName "1.0.3"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])

    compile 'com.google.code.gson:gson:2.3.1'
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.rengwuxian.materialedittext:library:2.1.3'
    compile 'com.github.navasmdc:MaterialDesign:1.5@aar'
    compile 'com.google.android.gms:play-services-maps:8.3.0'
    compile 'com.google.android.gms:play-services-location:8.3.0'
    compile 'com.github.rey5137:material:1.2.1'
    compile 'com.squareup.retrofit:retrofit:1.9.0'
    compile 'com.github.dexafree:materiallist:3.0.1'
    compile('com.mikepenz:materialdrawer:3.1.2@aar') {
        transitive = true
    }

}

我已将multidexEnabled设置为true,但问题仍然存在。请帮忙。

0 个答案:

没有答案