Issue
I'm trying build NDK project with new Gradle experimental plugin, but it seems that Gradle ignores the Android.mk and starts to compile everything without paying an attention to what written in the Android.mk, I am aware of the new syntax and I read the following Experimental Plugin User Guide also I tried the following syntax:
android.sources {
main {
jni {
source {
srcDirs = []
}
}
}
}
but it still ignoring the Android.mk file. I'm using:
- Android Studio 1.3.1 stable
- Gradle 2.5 with experimental plugin 0.2.0
Can anyone advise to that?
Solution
if you set
android.sources{
main.jni {
source {
srcDirs = ['src/main/none'] // [] could be set instead but will disable even symbol resolution inside the editor
}
}
main.jniLibs {
source {
srcDirs = ['src/main/libs']
}
}
}
Android Studio will not try to build your sources, and it will integrate your .so files that are inside src/main/libs/<abi>/
That means you can call ndk-build yourself, and your Makefiles will not be ignored.
Answered By - ph0b
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.