I am trying to compile code using the Android NDK. I have previously used this code fine, but changed one thing in it and now it will not compile. The error that shows up is:
"Compile++ thumb : filters <= filters.cpp
C:/Android/my-app//jni/filters.cpp:4:28: fatal error: android
/bitmap.h: No such file or directory
compilation terminated.
make: *** [C:/Android/my-app//obj/local/armeabi/objs/filters/
filters.o] Error 1
My bitmap.h file is defined in the library as:
#include <android/bitmap.h>
I know that bitmap.h is only there after a target-skd build of 8 or higher, and mine is a target of 10 and min of 8. Any suggestions? This is driving me crazy and used to work!Thanks for any help you can provide.
Edit: Here is my Android.mk file also
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := filters
LOCAL_SRC_FILES := filters.cpp
LOCAL_LDLIBS := -lm -llog -ljnigraphics
include $(BUILD_SHARED_LIBRARY)
Got it to work. I was using SDK tools revision 20, and platform-tools revision 12. In order to get it to compile, I had to specify the APP_PLATFORM in the command line (apparently these revisions default to something else).
Just ran:
ndk-build APP_PLATFORM=android-8
and it built!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With