user1933677
user1933677

Reputation:

Why does my gradle take so long? > 13 minutes

Why does Gradle take so long on my computer? Especially after making minor changes? Something must be broken. Does anyone have any ideas? I'm using Android Studio on Ubuntu 15.04. Android Studio is fully updated.

enter image description here

Here is my gradle files if relevant.

// 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()
    }
}

and...

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'
}

Upvotes: 3

Views: 660

Answers (1)

hata
hata

Reputation: 12503

I think this line is weird:

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

If you use Google Services SDK, it should be in the app's gradle but not in the project's. And you already have one of v7.8.0 in app's, too.

And what is this line? Is this needed?

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

Upvotes: 2

Related Questions