:app:transformClassesWithDexForDebug花费太多时间

时间:2015-12-19 16:46:17

标签: java android android-studio

我使用gradle 2.8运行Android Studio 1.5.1。建设过程耗费了大量时间。在Gradle控制台中,:app:transformClassesWithDexForDebug执行很长一段时间,即平均2分钟。我该怎么做才能降低gradle构建时间? 这是我的应用程序的build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    // buildToolsVersion "23.0.1"
    buildToolsVersion "23.0.1"


    defaultConfig {
        applicationId "com.infistart.medoboss"
        minSdkVersion 14
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

ext {
    supportLibVersion = '23.1.1'  // variable that can be referenced to keep support libs consistent
}

dependencies {
    //compile fileTree(include: ['*.jar'], dir: 'libs')
    compile files('libs/volley.jar')
    compile files('libs/aws-android-sdk-core-2.2.9.jar')
    compile files('libs/aws-android-sdk-s3-2.2.9.jar')
    compile files('libs/androidasync-2.1.6.jar')
    compile files('libs/ion-2.1.6.jar')
    compile files('libs/gson-2.2.2.jar')
    compile files('libs/org.apache.http.legacy.jar')
    compile files('libs/picasso-2.5.2.jar')
    compile project(':library-1.3')


    compile "com.android.support:percent:${supportLibVersion}"
    compile "com.android.support:support-annotations:${supportLibVersion}"
    //   compile 'com.android.support:design:23.0.1'

    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
    compile 'com.android.support:cardview-v7:23.1.1'
    compile 'com.android.support:recyclerview-v7:23.1.1'
    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.nkzawa:socket.io-client:0.3.0'
    compile 'info.hoang8f:fbutton:1.0.5'
    compile 'com.klinkerapps:android-chips:1.0.1@aar'
    compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
}

0 个答案:

没有答案