2014-04-08 42 views
0

使用命令行構建NativeActivity項目時,我可以將其他參數傳遞到ndk-build,如-j 4-Beclipse中的NDK命令行參數

有沒有一種方法可以設置它,以便在通過eclipse運行構建時傳遞相同的參數?

回答

1

是的,你可以做到上述。首先,您需要安裝用於eclipse的CDT插件。如果您使用Android-adt-bundle的eclipse,那麼eclipse會預裝CDT插件。

其次,你需要設置NDK路徑,如下圖所示的喜好:

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

三,

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

四,

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.