-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Home
Gerry edited this page Apr 16, 2020
·
11 revisions
- Android NDK r12+ for Android Studio + cmake/ndkbuild support
- For NDK r11 and earlier, gradle-experimental works, or other tools like ant. Branch android-mk keeps command-line / eclipse samples
- Android Studio: use "Import project (Eclipse ADT, Gradle, etc)", or "File" > "Import Project", local.properties file will be created. Double check sdk and ndk directories are setting correctly in that file.
- Configure NDK path
- Command Line: set up two environment variables ANDROID_HOME (for sdk dir) and ANDROID_NDK_HOME(for ndk dir), then "gradlew assembleDebug"
- In app/build.gradle, add compile dependency for debug and release builds with:
debugCompile project(path: ':your-lib', configuration: 'debug')
releaseCompile project(path: ':your-lib', configuration: 'release') - in lib(s)/build.gradle, enable publishNonDefault:
android {
publishNonDefault true
}
Please check the workaround
In build.gradle
defaultConfig.externalNativeBuild.cmake.targets "target1", "target2"