I am trying to add arguments to cmake in order to follow the Android NDK instructions for using the address sanitiser. In the build.gradle file for the native module I therefore have the following:
externalNativeBuild {
cmake {
path "CMakeLists.txt"
arguments "-DANDROID_ARM_MODE=arm", "-DANDROID_STL=c++_shared"
cppFlags "-fsanitize=address -fno-omit-frame-pointer"
}
}
When I try to sync my project (Android Studio v. 3.4.2, Win10) I get the error message:
ERROR: Gradle DSL method not found: 'arguments()'
I've searched the web but can't find any other mention of this problem with the 'arguments' method. I'm using gradle 3.4.2.
What am I missing?