为什么 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 Services SDK,它应该在应用程序的 gradle 中,而不是在项目的 gradle 中。而且您的应用程序中也已经有 v7.8.0 之一。
这条线是什么?有这个必要吗?
apply plugin: 'com.google.gms.google-services'
关于android - 为什么我的 gradle 需要这么长时间? > 13 分钟,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33050812/