Unable to launch cygpath in android

2019-01-31 03:07发布

问题:

When i am trying to import a project to my workspace it shows an error

[2013-03-17 16:14:15 - Unable to launch cygpath. Is Cygwin on the path?] java.io.IOException: Cannot run program "cygpath": CreateProcess error=2, The system cannot find the file specified

this project contains jni libraries,it is a ndk based project.why this error happen i cant import this project to my system.

回答1:

go to your project right click there.then take properties and select the c/c++ build and there you can see the build settings .and in the build settings give the path of ndk in your system like:

D:\android\android-ndk-r8d\ndk-build.cmd NDK_DEBUG=1

Now clean your project and run. Thats it.



回答2:

With NDK r8d, you don't need cygwin. Maybe the project you import was tuned for an older version, and maybe it defined ndk-build.sh as the C++ build command. You should use ndk-build.cmd or simply ndk-build (utilizing Windows command line conventions)



回答3:

You can set an environment variable

NDK_HOME = [your path to ndk]