摇篮打造停留在产生调试源 [英] Gradle Build stuck at generate debug sources

查看:153
本文介绍了摇篮打造停留在产生调试源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

摇篮卡[:机器人:generateDebugSources。

Gradle gets stuck when I try to build on the task [:android:generateDebugSources].

我已经离开它没有一个成功的构建运行数个小时。

I've left it running for hours without a successful build.

我已经试过了Android Studio中1.0.0,0.8.1,与摇篮版本2.1.1,1.12,1.14使用默认封装,Android插件版本0.12,+和0.14.4以及当地分布。我重新安装的Andr​​oid Studio和没有任何运气重新启动。也试图文件 - >无效缓存/重新启动

I've tried it in Android Studio 1.0.0, 0.8.1, with Gradle versions 2.1.1, 1.12, 1.14, Android plugin versions 0.12.+ and 0.14.4 using the default wrapper as well as local distributions. I've reinstalled Android Studio and rebooted without any luck. Also tried File --> invalidate caches/Restart.

下面是我的Andr​​oid包的的build.gradle:

Here is my android package's build.gradle:

buildscript {
repositories
        {
    maven { url 'https://maven.fabric.io/repo' }
}

dependencies {
    classpath 'io.fabric.tools:gradle:1.+'
}
}

apply plugin: 'android'
apply plugin: 'io.fabric'

repositories {

maven { url 'https://maven.fabric.io/repo' }
}

android {
compileSdkVersion 21
buildToolsVersion '21.1.1'

defaultConfig {
    minSdkVersion 11
    targetSdkVersion 21
    versionCode 13
    versionName "onBoarding"
}
buildTypes {
    release {
        runProguard false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/android-query-full.0.26.8.jar')
compile files('libs/gson-2.3.jar')
compile 'com.android.support:appcompat-v7:21.+'
compile 'com.android.support:support-v4:21.+'
compile 'com.android.support:recyclerview-v7:21.+'
compile 'com.google.android.gms:play-services:6.1.71'
}

然后我的项目级gradle.build文件:

And then my project-level gradle.build file:

buildscript {
repositories {
    mavenCentral()
}
dependencies {
    classpath 'com.android.tools.build:gradle:0.12.+'
}
}

allprojects {
repositories {
    mavenCentral()
}
}

任何意见很大AP preciated。

Any advice greatly appreciated.

推荐答案

明白了!更改 buildToolsVersion 21.1.1 20 产生了成功的构建。

Got it! Changing the buildToolsVersion from 21.1.1 to 20 yielded a successful build.

这篇关于摇篮打造停留在产生调试源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆