cnlohr / rawdrawandroid

Build android apps without any java, entirely in C and Make
MIT License
2.75k stars 197 forks source link

test.c:10:10: fatal error: 'asset_manager.h' file not found #40

Closed muffledMitosis closed 3 years ago

muffledMitosis commented 3 years ago

Hi!

I have installed all the Sdk components and the NDK, but get this error when running make push run, cant for the life of me figure out whats up, ill add a screen shot of the full error below :)

Thank You!

screenshot 1608096911

dreua commented 3 years ago

I'd check that the file is in one of the include paths (-I arguments as listed in your screenshot). For me it's in /home/da/Android/Sdk/ndk/21.1.6352462/sysroot/usr/include/android (among others) so it should probably be in that path adapted to your username and ndk version.

muffledMitosis commented 3 years ago

I'd check that the file is in one of the include paths (-I arguments as listed in your screenshot). For me it's in /home/da/Android/Sdk/ndk/21.1.6352462/sysroot/usr/include/android (among others) so it should probably be in that path adapted to your username and ndk version.

I did find ~/Android/Sdk/ndk/22.0.7026061/* | grep "asset_manager.h" and found it at ~/Android/Sdk/ndk/22.0.7026061/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/android/asset_manager.h

screenshot 1608172930

changing line 84 of the makefile to be CFLAGS+= -I$(RAWDRAWANDROID)/rawdraw -I$(NDK)/sysroot/usr/include -I$(NDK)/toolchains/llvm/prebuilt/$(OS_NAME)/sysroot/usr/include/a ndroid -fPIC -I$(RAWDRAWANDROID) -DANDROIDVERSION=$(ANDROIDVERSION) fixed the issue