I have the following code as my Android.mk in my project/jni folder. folder libA is in project/jni and it has a Android.mk. I included libA in jni/Android.mk
jni/Android.mk:
LOCAL_PATH := $(call my-dir)
include $(LOCAL_PATH)/libA/Android.mk
include $(CLEAR_VARS)
LOCAL_MODULE := hello-jni
LOCAL_SRC_FILES := hello-jni.c
include $(BUILD_SHARED_LIBRARY)
I get this error
jni/Android.mk:16: jni: Permission denied
jni/Android.mk:16: /libA/Android.mk: No such file or directory
make: *** No rule to make target `/libA/Android.mk'. Stop.
I tried solution given in this:
No rule to make target NDK .But the same error showed up again. I’m unable to figure out why this is happening.
Makefile is a tricky thing. my-dir is changed when u call sub directories and such.
But you can actually solve it without placing the source code in /jni file.
Call 2nd statement before any clear vars. Done!