android_native_app_glue.h Not Found

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
IrrlichtForiOS
Posts: 61
Joined: Mon Oct 08, 2012 1:46 pm

android_native_app_glue.h Not Found

Post by IrrlichtForiOS »

While trying myself to get the example 27 (Android) running i'm getting the following error.

Code: Select all

In file included from /Users/dbocksteger/StudioProjects/27.HelloWorld_Android/app/src/main/jni/cpp/android_tools.cpp:4:0:
/Users/dbocksteger/StudioProjects/27.HelloWorld_Android/app/src/main/jni/cpp/android_tools.h:8:37: fatal error: android_native_app_glue.h: No such file or directory
 #include <android_native_app_glue.h>
                                     ^
compilation terminated.
make: *** [/Users/dbocksteger/StudioProjects/27.HelloWorld_Android/app/build/intermediates/ndk/debug/obj/local/arm64-v8a/objs/Irrlicht//Users/dbocksteger/StudioProjects/27.HelloWorld_Android/app/src/main/jni/cpp/android_tools.o] Error 1
Error:Execution failed for task ':app:compileDebugNdk'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/dbocksteger/Library/Android/sdk/ndk-bundle/ndk-build'' finished with non-zero exit value 2
I tried to add the following to my buid.gradle file, but lbLibs isn't found as well. so this doesn't work, too.

Code: Select all

ndk {
            moduleName "native-activity"
            // lbLibs "log", "android", "EGL", "GLESv1_CM"
            cFlags "/Users/dbocksteger/Library/Android/sdk/ndk-bundle/sources/android/native_app_glue"
        }
Is here anybody who can explain me how to get Android Studio finding this file?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: android_native_app_glue.h Not Found

Post by CuteAlien »

I have no experience with Android Studio, but I suppose it's not finding the path.
Like the example readme says you have to add $ANDROID_HOME/tools and $ANDROID_HOME/platform-tools and the Android NDK main folder to your PATH environment variable. Or when using an IDE you have to find some way to get it to find those.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply