简体   繁体   English

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

[英]Android studio Error:Configuration with name 'debug' not found

I have a problem. 我有个问题。 When I want do Gradle project sync in my project, he write: 当我想在我的项目中进行Gradle项目同步时,他写道:

 Error:Configuration with name 'debug' not found.

Only this one line, nothing more. 只有这一行,仅此而已。
I don't know what he want from me. 我不知道他要我做什么。

Here is build.gradle : 这是build.gradle

buildscript {
    repositories {
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.2'
    }

}

apply plugin: 'android-library'

ext {
    apply from: 'cordova.gradle'
    cdvCompileSdkVersion = privateHelpers.getProjectTarget()
    cdvBuildToolsVersion = privateHelpers.findLatestInstalledBuildTools()
}

android {

    compileSdkVersion 21
    buildToolsVersion '21.1.2'

    defaultConfig {
        targetSdkVersion 24
        multiDexEnabled true
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_6
        targetCompatibility JavaVersion.VERSION_1_6
    }

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }
    }
}

I started to experence the error since I had updated cordova-android to 6.0.0. 由于将cordova-android更新到6.0.0,所以我开始遇到该错误。

I overcame it by using 我通过使用克服了它

android {
    publishNonDefault true
}

You can read about it here http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Library-Publication 您可以在这里阅读有关它的信息http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Library-Publication

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Android Studio中找不到名称为“ debug”的配置 - Configuration with name 'debug' not found in Android Studio 错误:在Android Studio中找不到名称为“default”的配置 - Error: Configuration with name 'default' not found in Android Studio Android Studio错误:找不到名称为“默认”的配置 - Android Studio Error: Configuration with name 'default' not found Android Studio 2错误:找不到名称为“默认”的配置 - Android Studio 2 Error:Configuration with name 'default' not found 错误:在Android Studio中使用TextFairy找不到名称为“默认”的配置 - Error:Configuration with name 'default' not found in Android Studio using TextFairy 错误:在Android Studio,Volley和ArcMenu中找不到名为“默认”的配置 - Error: Configuration with name 'default' not found in Android Studio, Volley and ArcMenu Android Studio Gradle:错误:找不到名称为“compile”的配置 - Android Studio Gradle : Error:Configuration with name 'compile' not found 在android studio中添加LinkedIn SDK错误:“找不到名称'默认'的配置” - Adding LinkedIn SDK in android studio error: “Configuration with name 'default' not found” 错误:找不到名称为“默认”的配置-Android Studio中的库 - Error:Configuration with name 'default' not found - Libraries in Android Studio Android studio gradle错误,“配置名称默认未找到”与鸟舍sdk - Android studio gradle error, “configuration with name default not found” with aviary sdk
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM