I am trying to compile my C code using Android NDK. I downloaded and installed, as suggested on the Android NDK Page , and tried to compile as prescribed, but it seems to have some problems, and I donβt know. It seems like it doesnβt 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 simple. Any help would be greatly appreciated.
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 delete a line from my makefile, include $ (LOCAL_PATH) /Android.mk, I get the correct output, which
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'
source
share