Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Android NDK

From Wikipedia, the free encyclopedia
Not to be confused withAndroid SDK.
Android NDK
Developer(s)Google
Initial releaseJune 2009; 15 years ago (2009-06)[1]
Stable release
r27c[2] Edit this on Wikidata / 16 October 2024; 5 months ago (16 October 2024)
Repository
Written inC andC++
Operating system
PlatformIA-32 (Windows only) orx86-64 (Windows,[3] macOS and Linux)
Available inEnglish
TypeSDK
Websitedeveloper.android.com/ndk/

TheAndroid Native Development Kit (NDK) provides across-compiling tool for compiling code written inC/C++ can becompiled toARM, orx86native code (or their64-bit variants) forAndroid.[4][5] The NDK uses theClang compiler to compile C/C++.GCC was included until NDK r17, but removed in r18 in 2018.

Overview

[edit]

Native libraries can be called fromJava code running under theAndroid Runtime usingSystem.loadLibrary, part of the standard Android Java classes.[6][7]

Command-line tools can be compiled with the NDK and installed usingadb.[8]

Android usesBionic as itsC library, and theLLVM libc++ as itsC++ Standard Library. The NDK also includes a variety of other APIs:[9]zlib compression,OpenGL ES orVulkan graphics,OpenSL ES audio, and various Android-specific APIs for things like logging, access to cameras, or acceleratingneural networks.

The NDK includes support forCMake and its ownndk-build (based onGNU Make).Android Studio supports running either of these fromGradle. Other third-party tools allow integrating the NDK intoEclipse[10] andVisual Studio.[11]

ForCPU profiling, the NDK also includes simpleperf[12] which is similar to theLinux perf tool, but with better support for Android and specifically for mixed Java/C++ stacks.

References

[edit]
  1. ^"Android NDK | Android Developers". Developer.android.com. November 13, 2012. RetrievedMarch 13, 2014.
  2. ^"Release NDK r27c · android/ndk · GitHub". Retrieved26 October 2024.
  3. ^"NDK Downloads | Android Developers".developer.android.com. Retrieved2018-04-24.
  4. ^Ratabouil, Sylvain (2015).Android NDK beginner's guide : discover the native side of Android and inject the power of C/C++ in your applications (2nd ed.). Birmingham.ISBN 978-1-78398-965-2.OCLC 910639612.{{cite book}}: CS1 maint: location missing publisher (link)
  5. ^Kosarevsky, Sergey (2013).Android NDK game development cookbook : over 70 exciting recipes to help you develop mobile games for Android in C++. Viktor Latypov. Birmingham.ISBN 978-1-78216-779-2.OCLC 880639342.{{cite book}}: CS1 maint: location missing publisher (link)
  6. ^Srinivas, Davanum (December 9, 2007)."Android — Invoke JNI based methods (Bridging C/C++ and Java)".Archived from the original on December 16, 2008. RetrievedDecember 13, 2008.
  7. ^"java.lang.System".Android Developers. RetrievedSeptember 3, 2009.
  8. ^"Android Debug Bridge (adb)".
  9. ^"Android NDK Native APIs | Android NDK".
  10. ^"Using Eclipse for Android C/C++ Development". January 23, 2011.
  11. ^"Using Visual Studio to Develop Native Android Code – VisualGDB Tutorials". 30 April 2015.
  12. ^"Simpleperf | Android NDK".
Retrieved from "https://en.wikipedia.org/w/index.php?title=Android_NDK&oldid=1262784218"
Categories:
Hidden category:

[8]ページ先頭

©2009-2025 Movatter.jp