Android错误:找不到名称为“default”的配置

时间:2015-03-17 12:21:25

标签: android eclipse android-studio gradle

我尝试将mopub-sdk添加到从eclipse导入到AndroidStudio的项目中。 我在项目的根文件夹中创建了文件夹,然后我添加到settings.gradle line:" include':mopub-sdk'然后点击"立即同步"然后我打开"项目结构"并将依赖项添加到我的项目,最后我得到了这个错误:

Error:Configuration with name 'default' not found.

请帮助,我试着整天做这个工作...... 我阅读了所有关于如何使其成功的主题,但没有任何帮助我...

setting.gradle:

include ':app'
include ':mopub-sdk'

的build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 20
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "pl.brysp.fiszki.angielski"
        minSdkVersion 9
        targetSdkVersion 20
    }

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

dependencies {
    compile 'com.android.support:support-v4:20.0.0'
    compile 'com.google.android.gms:play-services:+'
    compile files('libs/MMSDK.jar')
    compile files('libs/nmdp_speech_kit.jar')
    compile project(':mopub-sdk')
}

1 个答案:

答案 0 :(得分:0)

检查 module build.gradle文件,确保模块的build.gradle位于mopub-sdk下。