ndk - sdk - platform version correspondence

1,105 views
Skip to first unread message

aulty

unread,
Jan 10, 2012, 10:05:30 AM1/10/12
to android-ndk
Hi group,

Can someone explain to me how the ndk revisions relate to the android
platform versions/ api levels?
Can you use an older ndk with a newer sdk?
I can see the link between ndk and sdk via the minSdkVersion but no
link the other way.

Cheers,
Matt

David Turner

unread,
Jan 10, 2012, 2:37:47 PM1/10/12
to andro...@googlegroups.com
On Tue, Jan 10, 2012 at 4:05 PM, aulty <matthe...@googlemail.com> wrote:
Hi group,

Can someone explain to me how the ndk revisions relate to the android
platform versions/ api levels?

The NDK contains the following:

- some platform headers and libraries for *each* supported native API level (e.g. NDK r7 contains files corresponding to API levels 3, 4, 5, 8, 9 and 14, intermediate API levels fallback to the nearest level below them, e.g. SDK API level 7 will map to native API level 5).

- some prebuilt toolchain binaries that run on your host machine and generate code that runs on ARM and x86 based Android devices (with the help of the above platform files)

- some helper libraries (e.g. C++ runtimes, or "cpu-features") that can be linked into your own code.

- a build system (invoked by ndk-build) that allows developers to write very small build control files to compile their sources with said toolchains. However, it is optional now, and you can use the toolchain binaries in "standalone" mode too.

Each new NDK release usually contains improvements to any of these items. More importantly:

- new platform headers/libraries for newer API levels (but still including the ones for earlier ones)
- eventually, misc fixes to the platform/headers libraries (e.g. typos)
- eventually, misc fixes to the toolchain binaries
- eventually, misc fixes, or additional, helper libraries
- misc fixes and improvements to the build system
 
Unless it contains bugs that prevent you to use it, there is no reason to use an older version of an NDK; even if you are targetting an old API level in your application, it should just be supported.

Hope this helps.

- David


Can you use an older ndk with a newer sdk?
I can see the link between ndk and sdk via the minSdkVersion but no
link the other way.

Cheers,
Matt

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.


Reply all
Reply to author
Forward
0 new messages