Android bitmap.h not found to compile native code

I am trying to compile code using Android NDK. I previously used this code in order, but changed one in it, and now it will not compile. An error message will appear:

"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 only exists after building target-skd 8 or higher, and my is target 10 and min 8. Any suggestions? It drives me crazy and used to work! Thanks for any help you can provide.

Edit: Here is my Android.mk file as well

 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) 
+4
source share
3 answers

Got it to work. I used version SDK tools 20 and version 12 for platforms. In order to compile it, I had to specify APP_PLATFORM on the command line (apparently, these versions were by default something else).

Just ran:

 ndk-build APP_PLATFORM=android-8 

and it is built!

+14
source

Paste APP_PLATFORM = android-8 into Application.mk file

+1
source

Well, the answer answered me too. I tried setting APP_PLATFORM variabile to android-10 from Application.mk (since I expected that this parameter should also be where APP_ABI is located), but that didn't help. Pretty unintuitive, but it works, right ..?

0
source

All Articles