我在项目中使用NDK ...... 我的android.mk文件
LOCAL_PATH:=$(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE:= libfreeimage
LOCAL_SRC_FILES:=libfreeimage.a
include $(PREBUILT_STATIC_LIBRARY)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE:= imageprocessing
LOCAL_SRC_FILES:= imageprocessing.cpp
LOCAL_STATIC_LIBRARIES:= libfreeimage
LOCAL_LDLIBS:= -lm -llog -ljnigraphicss
include $(BUILD_SHARED_LIBRARY)
我得到的错误 -
flock@QS57:~/Desktop/android-imagefilter-ndk$ /home/flock/ANDROID/android-ndk-r8/ndk-build
make: *** No rule to make target `/home/flock/ANDROID/android-ndk-r8/build/core/imageprocessing.cpp', needed by `obj/local/armeabi/objs/imageprocessing/imageprocessing.o'. Stop.
我的档案层次......
jni-
Android.mk
imageprocessing.cpp
libfreeimage.a
答案 0 :(得分:1)
那么, 我得到了解决方案,因为我给了“LOCAL_PATH:= $(调用my-dir)”两次。我删除了第二个“LOCAL_PATH:= $(调用my-dir)”,问题解决了。