android studio 1.5的Gradle sync版本2.10失败:无法创建';任务。测试';使用创建规则';BaseComponentModelPlugin

android studio 1.5的Gradle sync版本2.10失败:无法创建';任务。测试';使用创建规则';BaseComponentModelPlugin,android,android-ndk,build.gradle,Android,Android Ndk,Build.gradle,我有Android Studio 1.5和Gradle版本2.10。 我得到以下错误: 梯度同步失败:无法使用创建规则BaseComponentModelPlugin创建“任务.测试” gradle.wrapper: #Thu Feb 25 11:21:40 PST 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipSto

我有Android Studio 1.5和Gradle版本2.10。 我得到以下错误: 梯度同步失败:无法使用创建规则BaseComponentModelPlugin创建“任务.测试”

gradle.wrapper:

#Thu Feb 25 11:21:40 PST 2016
  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:'java'
apply plugin:"com.android.model.application"
model {
    android {
        compileSdkVersion = 22
        buildToolsVersion = "23.0.1"

        defaultConfig.with {
            applicationId = "com.examples.anu.sqliteexamplewithjson"
            minSdkVersion.apiLevel = 21
            targetSdkVersion.apiLevel = 22
            versionCode = 1
            versionName = "1.0"

        }
    }

    // The module name is the output library name to build
    android.ndk {
        moduleName = "soundtouch-jni"
        // for native multimedia
        ldLibs.addAll(["OpenMAXAL", "mediandk"])
        CFlags.add("-DCUSTOM_DEFINE")
        ldLibs.addAll(["log", "android", "EGL", "GLESv1_CM"])
        cppFlags.add("-std=c++11")
        cppFlags.add("-fexceptions")
        cppFlags.add("-I${file("src/main/jni/")}".toString())
        stl = 'gnustl_shared'
    }//android.ndk

    android.buildTypes {
        debug {
            ndk {
                debuggable = true

            }
            minifyEnabled false
            useProguard = true
           // proguardFile getDefaultProguardFile('proguard-android.txt')
            applicationIdSuffix ".debug"
            proguardFiles.add(file('proguard-rules.txt'))
        }
        jnidebug {
            initWith(buildTypes.debug)
            packageNameSuffix ".jnidebug"
            jniDebuggable true
        }
    }

    android.productFlavors {

        create("arm7") {
            ndk {
                abiFilters.add("armeabi-v7a")
            }
        }


        create("arm8") {
            ndk {
                abiFilters.add("arm64-v8a")
            }
        }
        create("x86-32") {
            ndk {
                abiFilters.add("x86")
            }
        }

    }// productflavors

    // Configures source set directory.
    android.sources {
        main {
            java {
                source {
                    srcDir "src"
                }
            }
            jni {
                source {
                    srcDirs "src"
                }

            }

            jniLibs {
                source {
                    srcDirs "src"
                }
                dependencies {
                    //  project ":src/main/soundtouch/jniLibs/armeabi-v7a/libsoundtouch-jni" buildType "debug" productFlavor "armeabi-v7a" linkage "shared"
                    // library "soundtouch-jni" linkage "shared"
                    project ":libsoundtouch-jni" buildType "debug" productFlavor "armeabi-v7a" linkage "shared"

                }

            }

        }

    }// android.sources

}




task ndkBuildName(type: Exec) {
    commandLine '/Users/Anu/android-ndk-r10d/ndk-Build',
            '-C',
            'NDK_PROJECT_PATH=build/intermediates/ndk',
            'NDK_LIBS_OUT=src/main/jniLibs',
            'APP_BUILD_SCRIPT=src/main/jni/Android.mk',
            'NDK_APPLICATION_MK=src/main/jni/Application.mk'
}


//tasks.withType(JavaCompile){
task compile(type: JavaCompile) {
    compileTask -> compileTask.dependsOn(ndkBuildName)
}

dependencies {
    compile fileTree(dir: "libs", include: ["*.jar"])
    compile fileTree(dir: 'src/main/jniLibs', include: '*/*.so')
    compile fileTree(dir: 'src/main/jniLibs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.2.0'
    compile 'com.google.code.gson:gson:2.3'
    compile 'com.squareup:otto:1.3.5'
    compile 'com.android.support:support-v4:22.2.0'
    compile 'com.android.support:design:22.2.0'
    compile 'com.jakewharton:butterknife:6.1.0'
    compile 'joda-time:joda-time:2.3'
    compile 'com.github.traex.rippleeffect:library:1.3'

}
我的应用程序:build.gradle:

 buildscript {
        repositories {
            jcenter()
        }


    dependencies {
        classpath 'com.android.tools.build:gradle-experimental:0.6.0-beta5'

    }
}
apply plugin: 'com.android.model.application'
allprojects {
    repositories {
        jcenter()
    }
}
我不知道如何修正这个错误。
有人能帮忙吗?谢谢

你有什么理由需要使用Android的实验性gradle插件吗?有一个完全发布的版本,默认情况下会添加到新应用中,您应该使用它。感谢您的回复。我想使用Android NDk支持功能。删除java插件