Android NDK: Warning: There are no modules to build in this project

巧了我就是萌 提交于 2020-01-04 13:27:45

问题


I'm new in NDK development and I'm currently facing a problem, when I try to invoke the ndk build tool from cygwin terminal:

Android NDK: WARNING: There are no modules to build in this project!

I’m under windows (x64) and I use the r10d (64-bit) NDK. I try to invoke it from the root of my project that contains a jni folder with a simple .c file and an Android.mk:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

# Here we give our module name and source file(s)
LOCAL_MODULE    := mycfile
LOCAL_SRC_FILES := mycfile.c
APP_PLATFORM    := android-19

Thank you for your help !


回答1:


your Android.mk file is missing the macro that tells the ndk to actually build a module. Add this to the end of your file:

include $(BUILD_SHARED_LIBRARY)

Btw, APP_PLATFORM variable has to be put inside Application.mk instead of Android.mk.



来源:https://stackoverflow.com/questions/28188031/android-ndk-warning-there-are-no-modules-to-build-in-this-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!