为什么我的 gradle 需要这么长时间? > 13 分钟

Why does my gradle take so long? > 13 minutes

为什么 Gradle 在我的计算机上花费这么长时间?尤其是在做了一些小改动之后?有些东西必须被打破。有人有什么想法吗?我在 Ubuntu 15.04 上使用 Android Studio。 Android Studio 已完全更新。

如果相关,这是我的 gradle 文件。

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.0'
        classpath 'com.google.gms:google-services:1.3.0-beta1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

和...

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 23
    buildToolsVersion '23.0.0'

    defaultConfig {
        applicationId "ca.deanresin.arecipebook"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.google.android.gms:play-services:7.8.0'
    compile 'com.facebook.android:facebook-android-sdk:4.1.0'
    compile 'com.android.support:design:23.0.1'
}

我觉得这行很奇怪:

classpath 'com.google.gms:google-services:1.3.0-beta1'

如果您使用 Google 服务 SDK,它应该在应用的 gradle 而不是在项目的。而且您的应用程序中也已经有 v7.8.0 之一。

这条线是什么?这个有必要吗?

apply plugin: 'com.google.gms.google-services'