I have been trying to configure Android Studio for NDk by following this article and this article. The following are the contents of my gradle-wrapper.properties
NDK Build option
ndk {
moduleName "SeePlusPlus" // Name of C++ module (i.e. libSeePlusPlus)
cFlags "-std=c++11 -fexceptions" // Add provisions to allow C++11 functionality
stl "gnustl_shared" // Which STL library to use: gnustl or stlport
}
Have you declare your NDK path in Local.property file ??
Looks like the environment path and the local.properties files are pointing to different locations:
PATH: C:\Program Files (x86)\Android\android-ndk-r9d
local.properties: C:\Program Files (x86)\Android\android-studio\android-ndk-r9d
Make sure which is right. You can keep the PATH and drop the local.properties declerations, and then try this command through the console: ndk-build -? to see if it was found in PATH
In your build.gradle(module), the android.buildTypes block needs to outside of the android block. So it should look like this:
model {
android {
compileSdkVersion = 22
buildToolsVersion = "23.0.0 rc3"
defaultConfig.with {
applicationId = "com.opaxlabs.nativetest"
minSdkVersion.apiLevel = 15
targetSdkVersion.apiLevel = 22
versionCode = 1
versionName = "1.0"
}
}
android.buildTypes {
release {
minifyEnabled = false
proguardFiles += file('proguard-rules.pro')
}
}
android.ndk{
moduleName = "native"
}
}