Chapter 11Using Android NDK with Android Studio

WHAT'S IN THIS CHAPTER?

  • Introduction to Android NDK
  • Android Studio NDK integration
  • Starting a new NDK application in Android Studio
  • Building NDK applications with Android Studio and Gradle
  • Building NDK projects for multiple platforms
  • Multi vs. fat APK
  • NDK application release and deployment

This chapter focuses on the details of Android NDK and shows you how to build native C/C++ code in Android Studio. Native code is commonly used in Android projects for games and applications, which require high performance face recognition, audio processing, and so on. Although Android NDK is a powerful tool, many Android developers and projects may not need to use it. This chapter does not aim to teach Android NDK from the ground up but focuses instead on how to use Android NDK with the new Android Studio and Gradle.

At the time of this writing, Android NDK integration with Android Studio is still experimental and subject to change. We strongly suggest keeping your tools up-to-date and that you follow the updates to NDK integration if your application relies on NDK.

If you are an Android NDK newbie looking to learn NDK, we suggest you visit http://developer.android.com/ndk and follow the tutorials and code samples. NDK might look scary if you are not familiar with C/C++; however, it can unleash the full potential of your device's hardware and native libraries, and is well worth the effort.

INTRODUCTION TO ANDROID NDK

Android NDK is an essential ...

Get Expert Android Studio now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.