未找到名称为“default”的配置Android Studio Trakt.TV Traktoid

时间:2015-10-01 05:11:26

标签: gradle

我收到此错误

错误:未找到名称“default”的配置

我对app的build.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.0.1'
}
}

allprojects {
repositories {
    jcenter()
}
}

我的App build.gradle是

buildscript {
repositories {
    mavenCentral()
    maven { url 'https://maven.fabric.io/public' }
}

dependencies {
    classpath 'com.neenbedankt.gradle.plugins:android-apt:1.2'
    classpath 'io.fabric.tools:gradle:1.+'
}
}

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'android-apt'

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"

defaultConfig {
    applicationId "com.florianmski.tracktoid"
    minSdkVersion 16
    targetSdkVersion 21
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}

packagingOptions {
    exclude 'META-INF/DEPENDENCIES.txt'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/notice.txt'
    exclude 'META-INF/license.txt'
    exclude 'META-INF/dependencies.txt'
    exclude 'META-INF/LGPL2.1'
}

repositories {
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
    maven { url 'https://maven.fabric.io/public' }
}
}

dependencies {
compile 'com.android.support:support-v4:21.0.3'
compile 'com.android.support:recyclerview-v7:21.0.3'
compile 'com.android.support:appcompat-v7:21.0.3'

compile 'io.reactivex:rxandroid:0.23.0'

compile 'com.squareup.picasso:picasso:2.5.0'
compile 'com.jakewharton.timber:timber:2.5.0'
compile project(':trakt-java-git')
compile 'com.jpardogo.materialtabstrip:library:1.0.5'
compile 'com.getbase:floatingactionbutton:1.1.0'

apt 'net.simonvt.schematic:schematic-compiler:0.6.0'
compile 'net.simonvt.schematic:schematic:0.6.0'

compile('com.crashlytics.sdk.android:crashlytics:2.2.1@aar') {
    transitive = true;
}
}

有人可以帮我修复此错误。

我正在尝试在Android Studio上构建它并尝试其他答案:

Android Studio Gradle Configuration with name 'default' not found

Error: Configuration with name 'default' not found in Android Studio

但这些并没有多大帮助。因此,再次发布

1 个答案:

答案 0 :(得分:0)

转到文件,然后单击无效Cashes / restart 看看它是否有效