2011-01-31 74 views
1

喜如何構建NDK應用......現在我使用Linux操作系統和我是新的Android應用程序,請告訴我,只是....如何構建ndk應用程序?

+2

你爲什麼要使用NDK來構建應用程序?爲什麼不是SDK? – 2011-01-31 12:57:51

回答

1

請注意,NDK不會讓您構建應用程序。它只會讓你建立一個共享庫對象(.so),你的SDK應用程序將在運行時打開以執行本機代碼。

,而不是建立和安裝應用程序的標準方式:

ant compile # (or ant debug) 
ant install 

你將有一個額外的步驟:

ndk-build  # builds the .so files 
ant compile # builds the Java app and embeds the .so within the final .apk 
ant install