Issue
I have two separate native C++ project built with NDK and using in a single Android application. I have linked one of them to the project in Android project via right click and select "Link C++ Project with Gradle".
This operation added following text to build.gradle.
externalNativeBuild {
cmake {
path file('src/main/cpp/CMakeLists.txt')
}
}
How can I added another one to the application? Note I cannot merge those two C++ project. I want to debug C++ code in Android Studio, not just compile it.
Environment: Android Studio 3.4, gradle-4.10.1
Solution
link them to two library modules instead and add this there twice:
externalNativeBuild {
cmake {
path file('src/main/cpp/CMakeLists.txt')
}
}
sourceSets {
main {
jni.srcDirs = ["src/main/cpp"]
}
}
so it will load two different CMakeLists.txt
.
Answered By - Martin Zeitler
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.