Double module definition error
android, android-ndk, c
Solution
Why did you include Android.mk in itself using `include $(LOCAL_PATH)/Android.mk`
Problem
I am attempting to compile my C code using Android NDK. I downloaded and installed as suggested on the Android developer NDK Page, and attempted to compile as prescribed, but there seems to be some problem, and I don't seem to know what it is. ``` *** Command Line compile code ** C:\cygwin\android-ndk-r7c>ndk-build -C C:\Users\BoosterJack\workspace\workAndroid Android NDK: Trying to define local module 'stdc++' in C:/cygwin/android-ndk-r7c/sources/cxx-stl/system/Android.mk. Android NDK: But this module was already defined by C:/cygwin/android-ndk-r7c/sources/cxx-stl/system/Android.mk. make: Entering directory `C:/Users/BoosterJack/workspace/workAndroid' C:/cygwin/android-ndk-r7c/build/core/build-module.mk:34: *** Android NDK: Aborting. . Stop. make: Leaving directory `C:/Users/BoosterJack/workspace/workAndroid' ``` My make file is also a simple one. Any help will be greatly appreciated. ``` # Include makefiles here. include $(LOCAL_PATH)/Android.mk LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := NativeLibjni LOCAL_SRC_FILES := NativeLib.c include $(BUILD_SHARED_LIBRARY) ``` UPDATE When I remove the line from my makefile, include $(LOCAL_PATH)/Android.mk, I get the correct output which is ``` C:\Users\BoosterJack>ndk-build -C C:\Users\BoosterJack\workspace\workAndroid make: Entering directory `C:/Users/BoosterJack/workspace/workAndroid' "Compile thumb : NativeLibjni <= NativeLib.c SharedLibrary : libNativeLibjni.so Install : libNativeLibjni.so => libs/armeabi/libNativeLibjni.so make: Leaving directory `C:/Users/BoosterJack/workspace/workAndroid' ```