apply plugin: 'com.android.library' android { compileSdkVersion 27 externalNativeBuild { ndkBuild { path 'jni/Android.mk' } } defaultConfig { externalNativeBuild { ndkBuild { // Passes an optional argument to ndk-build. arguments "GRADLE=true" } } } }