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