Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android NDK: No rule to make target

OK, I've solved my issue, and the reason was very strange: the problem is in the first line

'LOCAL_PATH := $(call my-dir)____'

It had several spaces in the end (I've replaced them with '_'). If you remove them everything works just fine.

Hope that helps someone else.


On Mac OS X using android-ndk-r9 64 bit, remove white spaces from the NDK path. That fixed the No rule to make target error for me

Not exactly an answer for OP, but I guess it can save others from wasting their time.


Another problem that I found that causes this error is that the

LOCAL_SRC_FILES := native.c

and

LOCAL_MODULE    := native

use the same name. I'm not sure why this causes an error, as the code should be generated in different locations as native.o, native.od, and native. But, apparently it does.

I found this out while trying to compile hello.c to hello. Once I changed hello.c to main.c, everything compiled properly.