I am currently trying to upgrade my JNI library project to use Android studio 2.2.2
All tutorials say I need to point to my Android.mk, thing is, until now it was autogenerated.
With using android.useDeprecatedNdk=true
the Android.MK was automatically generated in projectDir/build/intermediates/ndk/<flavor>/<buildType>/Android.mk
Now I should point to it in
externalNativeBuild {
// Encapsulates your NDK-Build build configurations.
ndkBuild {
path "//path to Android.MK File"
}
}
Does this mean I now have to take care of the Android.MK file myself, or am I missing something?
Before Gradle was generating the Android.MK specifics using blocks like these:
ndk {
cFlags = " -DVENDOR="+vendor+" -DVERSION_NUMBER_MAJOR="+majorVersion+" -DVERSION_NUMBER_MINOR="+minorVersion+" -DVERSION_CODE="+versionCode+" "
}
Update
The main reason for not using android.useDepricatedNdk=true is that the IDE can't analyze my code. Throws a lot of: Failed to get the compiler information for file...`
The code itself compiles and runs fine actually.