We can use it to edit the native source code of Android. It can compile c/c++ code and run in your android devices, but the compilation may fail. You just need to provide the name of the module.
- Automatically find the module path
- Support
if、ifeq、ifneq、strip、filter - Automatically parse Android.mk conversion to cmake configuration
- Automatically parse module's dependencies
- Automatically parse module's include dirs
- Automatically parse module's definitions
- Android N source tree
- Ubuntu 16.04
- Windows 10
- Fully compiled android source tree
- Linux: ${your android source path}/prebuilts/clang/host/linux-x86/clang-2690385
- Windows: Android NDK
I ignored some folders by default. They defined in .idea/misc.xml. Because most files are ignored. So CLion is working perfectly.
Define your own Android environment.
Copy or link all file to your [Android Source Code], and configure your own environment
for example:
#env_android.cmake
set(ANDROID_LUNCH rk3399_box)
set(ANDROID_NDK "Your NDK path")
set(ANDROID_TARGET_ARCH arm64)
set(ANDROID_ABI "arm64-v8a")
set(ANDROID_TOOLCHAIN_NAME "clang")
set(ANDROID_STL c++_static)| Property | value | description |
|---|---|---|
| ANDROID_LUNCH | string | your own android lunch target |
| ANDROID_NDK | android ndk path | |
| ANDROID_TARGET_ARCH | arm/arm64 | lunch target arch |
| ANDROID_ABI | arm64-v8a/armeabi-v7a | clion complie abi |
| ANDROID_TOOLCHAIN_NAME | clang | toolchan, currently only supports clang |
| ANDROID_STL | N/A | future support content |
In CMakeLists.txt
# init all module
loadMoudle()
# load adbd(EXECABLE) and its dependencies
parseAndroidMK(adbd ${MK_EXECAB})
# load init(EXECABLE) and its dependencies
parseAndroidMK(init ${MK_EXECAB})| Property | description |
|---|---|
| MK_EXECAB | module of execable target |
| MK_SHARED | string of shared libs target |
| MK_STATIC | string of static libs target |
It can help clion complete function relation jump mapping.

not support windows- not support
include xxx.mkin Android.mk - not support make function:
all-makefiles-under...... - not support Android.bp
used on Windows- support make function
- Android.bp
If you have any suggestion or solution, welcome to discuss.
