I have a few questions regarding the c++ support in Android Studio.
First, can I add c++ code to an already built project in which I didn't check off the "include c++ support" feature? The internet always leads me to guides that start from 'New Project.' Secondly, if I were to start a new project, why does it remove the prebuilt activity options except for blank and empty activity? If All I need to use c++ for are functions then why would this affect the ability to build activities?
I realize most recommend to just learn java instead of messing with it, but I don't want that to hold me back from learning even if it is more complicated.
You can add C++ code to an existing project. All you need is externalNativeBuild block in your build.gradle:
externalNativeBuild { cmake { path "CMakeLists.txt" } }
The detailed instructions are available on Android Developer site: https://developer.android.com/studio/projects/add-native-code.html#existing-project
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.