NDK: Ignoring unknown import directory

Started by
2 comments, last by frob 9 years ago

Hi,

as the title says, upon building my project with this android.mk file included


LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE           := LiquidFun
LOCAL_SHARED_LIBRARIES := libliquidfun_jni

include $(BUILD_SHARED_LIBRARY)

$(call import-add-path,C:\Users\Ice Cave\Desktop\Java-Projects\Libraries\LiquidFun\liquidfun)
$(call import-module,Box2D\swig\jni)

I get these Errors and stops

15:37:16 **** Incremental Build of configuration Default for project LiquidFun ****
"C:\\AndroidSDK\\android-sdk-windows\\AndroidNDK\\ndk-build.cmd" all
Android NDK: WARNING: APP_PLATFORM android-21 is larger than android:minSdkVersion 8 in ./AndroidManifest.xml
Android NDK: WARNING: Ignoring unknown import directory: C:\Users\Ice Cave\Desktop\Java-Projects\Libraries\LiquidFun\liquidfun
Android NDK: jni/Android.mk: Cannot find module with tag 'Box2D\swig\jni' in import path
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Android NDK: The following directories were searched:
Android NDK:
jni/Android.mk:11: *** Android NDK: Aborting. . Stop.


15:37:17 Build Finished (took 955ms)

I guess the initial error why all of this stops is the line that it can't find and ignors the given import-directory.

So if it doesn't work to add an absolute path, where does it start searching from so I can try adding a relative path?

I wish I could somehow lookup where NDK_MODULE_PATH is heading at.

Thanks

With Best Regards

Advertisement


I wish I could somehow lookup where NDK_MODULE_PATH is heading at.

NDK_MODULE_PATH should be an environment variable. It can be read and set accordingly. Since it looks like you're on Windows, hit the start menu and type in 'environment variables', it should give the option to view and set both your personal and the system-wide values.

I'd be somewhat concerned that your installation was somehow corrupted or is incomplete.

Your other warnings are also concerning, and should not be ignored.

The first means that you need to adjust your build settings to target the right devices, the second and third mean it is not looking in the right places for files. All of them should be corrected.

Well regarding NDK_MODULE_PATH being an environment variable:

This variable doesn't show up in the Windows Env Variables window and when typing in "echo %NDK_MODULE_PATH%" in the cmd windows it prints just the variable name again.

Also the AndroidNDK doesn't get installed but unzipped and then linked to the AndroidSDK. The documentaries for the NDK are sadly outdated so I am not going to reference that for sure but in the install-doc this variable doesn't get mentioned anywhere.

Maybe it is some kind of a Unix env variable or something like that, that gets emulated on Windows.

From trial and error I found out that NDK_MODULE_PATH is pathing to my project directory because projects in the NDK are for some reason called "modules" - maybe again a C convention or something like that.

Last but not least: The reason why it didn't worked was because the NDK doesn't support whitespaces in file and foldernames. Hence the "unknown import directory".

So cut and copy of the whole project into another directory worked fine for me.

This also resolved the other errors because now it can find the subdirectory Box2D/swig/jni which is not located in NDK_MODULE_PATH but in the additional path I now successfully specified.

The only warning that keeps is that my min-sdk is lower defined then my target device, this happened because I didn't specified it in the application.mk and it just took the standard one which is not my defined min-sdk.

C/C++ stuff is really annoying on Android!

Yes, as a backup the scripts will set the variable if you don't already have it set. But you really should have it set in your environment, even in Windows.

That's why I'd be concerned that your installation is not complete on your system. It is supposed to be set as an environment variable. The fact that it isn't raises warning flags.

This topic is closed to new replies.

Advertisement