Question

When building a NativeActivity project using the command line, I can pass additional parameters to ndk-build such as -j 4 or -B.

Is there a way I can set it so those same parameters will be passed when I run a build through eclipse?

Was it helpful?

Solution

Yes you can do the above. First, you need CDT plugins installed for eclipse. If you are using eclipse from Android-adt-bundle then the eclipse comes pre-installed with CDT plugins.

Second, in the preferences you need to set the ndk path as shown below:

Eclipse -> Window -> Preferences -> Android -> NDK -> set path to the NDK

Third,

Right click on an Android project and select Android Tools -> Add native support.

Fourth,

    Right click project -> properties -> C/C++ Build:

    In the build command, you will be having ndk-build, now append that command wit whatever parameter you want to pass. Then press apply and press ok.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top