错误:无法在源集'main'上找到属性'manifest'。用实验性gradle插件0.6.0 beta5

时间:2016-03-03 08:37:07

标签: android-studio gradle-experimental

“错误:无法在源集'main'上找到属性'manifest'”当我使用以下build.gradle

时来到控制台

注意:版本为0.6.0-beta5的实验性gradle插件

的build.gradle:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle-experimental:0.6.0-beta5'
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

的gradle /包装/ gradle-wrapper.properties

#Wed Oct 21 11:34:03 PDT 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip

应用程序/的build.gradle:

apply plugin: 'com.android.model.application'

model {
    android {
        compileSdkVersion = 23
        buildToolsVersion = "23.0.2"

        defaultConfig.with {
            applicationId = "package.name"
            minSdkVersion.apiLevel = 10
            targetSdkVersion.apiLevel = 23

            multiDexEnabled = true
        }
  }

    android.sources {
        main {
            manifest.source {
                srcDir "."
                include "AndroidManifest.xml"
            }
            java.source.srcDirs += 'src'
            resources.source.srcDirs += 'resources'
            aidl.source.srcDirs += 'aidl'
            res.source.srcDirs += 'res'
            assets.source.srcDirs += 'assets'

            jniLibs.source.srcDirs += 'jniLibs'

            jni.source.srcDirs += 'src/jni'
        }
    }
}

0 个答案:

没有答案