Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/220.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 找不到gradle dsl ndkBuild() Error:(8, 0) Gradle DSL method not found: 'ndkBuild()' Possible causes:<ul><li>The project _Android_Android Ndk_Dsl_Ndk Build - Fatal编程技术网

Android 找不到gradle dsl ndkBuild() Error:(8, 0) Gradle DSL method not found: 'ndkBuild()' Possible causes:<ul><li>The project

Android 找不到gradle dsl ndkBuild() Error:(8, 0) Gradle DSL method not found: 'ndkBuild()' Possible causes:<ul><li>The project ,android,android-ndk,dsl,ndk-build,Android,Android Ndk,Dsl,Ndk Build,找不到gradle dsl ndkBuild() Error:(8, 0) Gradle DSL method not found: 'ndkBuild()' Possible causes:<ul><li>The project 'OCR4' may be using a version of Gradle that does not contain the method. <a href="open.wrapper.file">Open Gradle wr

找不到gradle dsl ndkBuild()
Error:(8, 0) Gradle DSL method not found: 'ndkBuild()'
Possible causes:<ul><li>The project 'OCR4' may be using a version of Gradle that does not contain the method.
<a href="open.wrapper.file">Open Gradle wrapper file</a></li><li>The build file may be missing a Gradle plugin.
<a href="apply.gradle.plugin">Apply Gradle plugin</a></li>
task ndkBuild(type: Exec) {
        workingDir = file("${android.sdkDirectory}/ndk-bundle")
        if (Os.isFamily(Os.FAMILY_WINDOWS)) {
            commandLine 'C:\\Users\\yogita\\Download\\android-ndk-r10e\\ndk-build.cmd', '-C', file('.').absolutePath,
                    '-j', Runtime.runtime.availableProcessors()
        } else {
            commandLine './ndk-build', '-C', file('.').absolutePath,
                    '-j', Runtime.runtime.availableProcessors()
        }
    }

    tasks.withType(JavaCompile) {
        compileTask -> compileTask.dependsOn ndkBuild
    }

    // cleanup task
    task ndkClean(type: Exec) {
        workingDir = file("${android.sdkDirectory}/ndk-bundle")
        if (Os.isFamily(Os.FAMILY_WINDOWS)) {
            commandLine 'C:\\Users\\yogita\\Download\\android-ndk-r10e\\ndk-build.cmd', '-C', file('.').absolutePath, 'clean'
        } else {
            commandLine './ndk-build', '-C', file('.').absolutePath, 'clean'
        }
    }

    tasks.withType(Delete) {
        cleanTask -> cleanTask.dependsOn ndkClean
    }