Reputation: 7975
I am developing an android application on using Android Studio on Windows 8 and I am using some native code. All of a sudden I can't compile the my C files. When I am running ndk-build I am getting the following error:
process_begin: CreateProcess(NULL, uname -a, ...) failed.
process_begin: CreateProcess(NULL, uname -r, ...) failed.
The system cannot find the path specified.
'mount' is not recognized as an internal or external command,
operable program or batch file.
I'm really frustrated since I haven't really messed with anything and both android-sdk and android-ndk seem to be in my PATH.
Any help would be really appreciated! Thank u
Upvotes: 4
Views: 8124
Reputation: 1399
When I had this problem the cause was some whitespace sneaking into my makefile between a line continuation ('\') and the newline. That is apparently utterly and cryptically unacceptable to Android Studio.
Have a look for any extra spaces/tabs or line-ending inconsistencies that an editor may have 'helpfully' (but invisibly) added to the makefile.
You don't need to have changed anything for this to creep in. In some cases just opening it in the wrong text editor will cause the file to change. In others, a simple seeming copy and paste will also add unwanted format adjustment.
Upvotes: 1
Reputation: 1
If you change the OpenCV.mk to your target platform such as OpenCV-x86.mk in the Android.mk file, then it will work.
Upvotes: 0
Reputation: 13548
I think that somewhere you are clearly targeting the wrong architecture for your NDK build-chain.
I suppose that in your error-log you can see something like this:
Android NDK: Unable to determine HOST_OS from uname -s: Android NDK: Please define HOST_OS in your environment. ... process_begin: CreateProcess(NULL, uname -s, ...) failed.
Under Windows you can try to use the command ndk-build.cmd
instead of ndk-build
, as suggested here.
Upvotes: 2