Android NDK will not build the library because Bitmap.h is missing?

I am using Android NDK to create a library. Everything was fine with me, but then I needed to change the name of the package referenced by the library. I tried to create the library again as soon as I made the changes by calling ndk-build in my folder, but this is the only result I get, and it doesn't seem to be fully built:

C:\my-app\jni>ndk-build -B "Compile++ thumb : filters <= filters.cpp C:/a-fa-outsidelands//jni/filters.cpp:4:28: fatal error: android/bitmap.h: No such file or directory compilation terminated. 

This leads to an unsatisfied communication error when trying to start the application. I will post my .mk file, but I don’t think it is important, because my previous library worked with this .mk file. I am doing rebuild (-B option) because it is above the previous build. Any suggestions? Here is my .mk file:

 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) 

Thanks for the help.

+1
source share
2 answers

What is android:targetSdkVersion in the application manifest? IIRC, bitmap.h not introduced until SDK v8.

EDIT: Was there a last successful build on the same machine with the same version of NDK? Does the line #include <android/bitmap.h> as opposed to "android/bitmap.h" ?

EDIT2: has targetSdkVersion changed since the last build? I found a funny thing: there is no android-10 under android-ndk-xx\platforms . Try to create an empty android-10 folder in android-ndk-xx\platforms and copy its android-9 contents. I honestly don't know what else to check.

+1
source

I have the same problem. Then I found this answer. Android bitmap.h not found to compile native code

Just ran:

 ndk-build APP_PLATFORM=android-8 
0
source

All Articles