Dec 12

Introducing Android Instant Apps

Posted by Suresh Ganapathy, Product Manager

Developers have built amazing Android apps. They use your mobile device to the fullest, including the camera, GPS, and sensors to connect to the real world. They’re beautiful and immersive, with Material Design and smooth animations running at 60 frames per second. They use access to identity and payments to create seamless experiences.

But developers tell us they wish they could bring users into their apps more quickly and easily. With the web, you can click on a link and land on a web page — it takes one click and just a few seconds. It should be easier for users to access a wider range of apps, and for developers to reach more people.

So, we asked ourselves: How do we make it possible for people to access a wider range of apps, seamlessly? How do we help developers reach more people? And how do we do that while giving developers access to the range of capabilities and experiences that Android apps provide?

Today we’re sharing a preview of a new project that we think will change how people experience Android apps. We call it Android Instant Apps, and it evolves Android apps to be able to run instantly, without requiring installation. With Instant Apps, a tap on a URL can open right in an Android app, even if the user doesn’t have that app installed.

As a developer, you won’t need to build a new, separate app. It’s the same Android APIs, the same project, the same source code. You’ll simply update your existing Android app to take advantage of Instant Apps functionality. In fact, it can take less than a day to get up and running for some developers, though the effort involved will vary depending on how your app is structured. You modularize your app, and Google Play downloads only the parts that are needed, on the fly. And when you do upgrade, your app will be available to more than a billion users on Android devices going back to Jelly Bean.

This is a big change, so it’s going to take some time. We’ve been working with a small set of partners to help refine the experience, including developers like BuzzFeed, B&H Photo, Medium, Hotel Tonight, Zumper and Disney. We’ll be gradually expanding access for developers and bringing Instant Apps to users later this year.

B&H Photo
(via Google Search)
(via a shared link)
Park and Pay (example)
(via NFC)

If you’re interested in learning more about Android Instant Apps, please check out the Android developers website, where you can sign up for updates as they become available. We can’t wait to see what you build when your app is just a tap away.

Android Developers Blog

Nov 26

Introducing the second class of Launchpad Accelerator

Originally posted on Google Developers blog

Roy Glasberg, Global Lead, Launchpad Program & Accelerator

This week Launchpad Accelerator announces its second class, which includes 24 promising startups from around
the world. While the number of accelerators is at an all-time high, we take a different approach with Launchpad Accelerator, a program that
exclusively works with late-stage tech startups in emerging markets — Brazil,
Indonesia, India and Mexico.

See what it’s like to participate in the Accelerator.

“We provide comprehensive mentorship that delivers results,” says Jacob Greenshpan, one of Launchpad’s lead mentors. “We start by running a ‘patient diagnostic’
to determine each startup’s critical challenges, and then deploy precise
mentorship, actionable solutions, and Google resources that enables the app to

Class 2 kicks off June 13. The startups will descend on Google HQ for an
intensive 2 week bootcamp. Under the tutelage of Google product teams and
mentors from the global Launchpad network, they will receive intensive,
targeted mentoring, equity-free funding, and more benefits during the 6-month

Here’s the full list of startups (by country):


BankFacil Emprego Ligado AppProva GetNinjas Edools Love Mondays


HijUp Talenta Jarvis Store Ruangguru IDNtimes Codapay


Taskbob Programming Hub ShareChat RedCarpet PlaySimple Games MagicPin


Aliada SaferTaxi Conekta Konfio Kichink Miroculus

Google’s “Scalerator” Drives Results for Alumni

What advice do Class 1 alumni give to the new intake? “Come to the accelerator
with an open mind. You will be shocked to find how many things are going wrong
in your app. Thankfully the mentors will help you implement better solutions,”
says Vinicius Heimbeck, Founder of Brazilian mobile game developer UpBeat

UpBeat Games had more than 1,000% increase in daily app installations in Asia
during the period of a feature, as well as a 200% overall increase in active
users after following a long list of improvements Accelerator mentors
suggested. “We made optimizations that led us to be featured in Google Play,
which changed everything for us.”

See Upbeat Games at the Accelerator in this video.

“Believe you can build a world class product. The mentors will push you to bet
on yourself,” says Amarendra Sahu, Nestaway Co-founder and Class 1 alumni.
NestAway just closed a $ 30M Series C, one of the largest investment rounds in India this year.

“Your biggest enemy is not failure; it is the temptation to be ordinary. But
the mentors will push you to build an extraordinary product and scale an
extraordinary startup,” says eFishery Co-founder and CEO Gibran Chuzaefah Amsi
El Farizy, who was announced as one of the top 27 leaders in Indonesia’s startup ecosystem, after participating in the
Accelerator program.

Android Developers Blog

Oct 13

Introducing Android Instant Apps SDK 1.1

Jichao Li, Software Engineer; Shobana Ravi, Software Engineer

Since our public
launch at Google I/O, we’ve been working hard to improve the developer
experience of building instant apps. Today, we’re excited to announce
availability of the Android Instant Apps SDK 1.1 with some highly-requested
features such as improved NDK support, configuration APKs for binary size
reduction, and a new API to maintain user’s context when they transition from an
instant app to the installed app.

Introducing configuration APKs

For a great instant app experience, app binaries need to be lean and well
structured. That’s why we’re introducing configuration APKs.

Configuration APKs allow developers to isolate device-specific resources and
native libraries into independent APKs. For an application that uses
configuration APKs, the Android Instant Apps framework will only load the
resources and native libraries relevant to the user’s device, thereby reducing
the total size of the instant app on the device.

We currently support configuration APKs for display density, CPU architecture
(ABI), and language. With these, we have seen an average reduction of 10% in the
size of the binaries loaded. Actual savings for a given app depend on the number
of resource files and native libraries that can be configured.

As an example, a user on an ARM device with LDPI screen density and language set
to Chinese would then receive device-agnostic code and resources, and then only
get the configuration APKs that have ARM native libraries, the Chinese language,
and LDPI resources. They would not receive any of the other configuration APKs
such as the x86 libraries, Spanish language strings, or HDPI resources.

Setting up configuration APKs for your app is a simple change to your gradle
setup. Just follow the steps in our public

Persistent user context after installation

On Android Oreo, the internal storage of the instant version of the app is
directly available to the installed version of the app. With this release of the
SDK, we are enabling this functionality on older versions of the Android
Framework, including Lollipop, Marshmallow, and Nougat devices.

To extract the internal storage of the instant app, installed apps can now call
using the Instant Apps Google Play Services API and get a ZIP file of the
instant app’s internal storage.

Check out our code sample and
for more details on how to use this API.

Start building your Android Instant App

It’s simple to start building your instant app on the latest SDK. Just open the
SDK Manager in Android Studio and update your Instant Apps Development SDK to
1.1.0. We can’t wait to see what instant app experiences you build with these
new features.

Android Developers Blog

Sep 08

Introducing Android Native Development Kit r16

Posted by Dan Albert, Android NDK Tech Lead

The latest version of the Android Native Development Kit (NDK), Android NDK r16
Beta 1, is now available for download. It
is also available in the SDK manager via Android Studio.

NDK r16 is a big milestone for us, because it’s the first release that we’re
ready to recommend that people start migrating to libc++! More on this later.

We’ve also updated libc++ and its related projects, so this release has improved
support for C++1z. Keep in mind that until C++1z becomes C++17, everything
included is subject to change.

You can find the release notes for this release here.

libc++ and libandroid_support

The NDK has a library called libandroid_support that backports libc APIs that
libc++ depends on that weren’t available on older releases. The reason we’ve
been unable to endorse libc++ (as implemented in the NDK) until now has been a
lack of confidence in this library. The focus of r16 was to rewrite this library
for improved stability.

Since libandroid_support is now a smaller library, your app’s behavior should
more closely match the behavior of the system. As an example, libandroid_support
previously included an alternative implementation of part of stdio. While some
features got backported to ICS, it also meant that any bugs in the alternate
implementation would be present on all OS releases since the bug was
baked into your app. In the new version of libandroid_support, we’ve removed
this so you’ll be missing some features on older devices (almost exclusively
things that no one uses, like %a support in format strings), but
your apps using libc++ will be smaller and more reliable for not having these

Switching to libc++

So, why should you switch to libc++? First and foremost, the other STLs will not
be supported going forward (this has been noted in our roadmap
for quite some time). We’ve been using libc++ for the Android platform since
Lollipop, and that’s been a change that our engineers have been overwhelmingly
happy with. We were able to make this transition in the platform earlier than we
could in the NDK because we didn’t need libandroid_support, and could instead
just update libc in place.

In contrast to the other STLs currently available in the NDK, libc++ fully
supports C++11, C++14, and most of C++1z! Stlport hasn’t had an update since
2008, and gnustl (what we call GNU’s libstdc++, to avoid confusion with Bionic’s
libstdc++, which isn’t an STL) historically hasn’t worked very well with Clang,
particularly in headers that are closely tied to compiler builtins like
and .

We’ll most likely be making libc++ the default in the next NDK release, but for
now you can opt-in if you’re not using it already by following the instructions

Like the other STLs, libc++ is available as both a static and shared library.
Which one you should use depends on your specific circumstances as described in
docs, but tl;dr use the static version if you have one and only one shared
library in your application, and use the shared one in all other cases.


Add the following to your file:

APP_STL := c++_shared


Pass the following when invoking CMake:


If you’re using CMake via Gradle, add the following to your build.gradle:

externalNativeBuild {
    cmake {
        arguments "-DANDROID_STL=c++_shared"

Standalone Toolchain

When you create your standalone toolchain, pass --stl=libc++.

The Future of libandroid_support

If you’ve read our
roadmap, you’ve seen that we’ve planned to expand libandroid_support to
backport as much of libc/libm as possible. Whenever we’ve spoken with people
about this, we’ve received lukewarm responses at best. Given that this doesn’t
seem to be a thing that people are interested in, and that it would be something
that increases library size (and therefore APK size, which is something
everyone seems very interested in), we no longer plan to do this.

If we’ve misinterpreted your response or if we haven’t heard from you and this
is something you want, please let us know!


tl;dr: Don’t set _FILE_OFFSET_BITS=64 if you want to keep the
behavior present in old NDKs.

Historically, setting _FILE_OFFSET_BITS=64 in the NDK did nothing.
This feature was not present in the deprecated headers at all. With unified
headers, the NDK now has up to date headers with support for this feature.

_FILE_OFFSET_BITS=64 is a macro you can define in your application
to get support for a 64-bit off_t in 32-bit code. This works by
both making off_t 64-bit (by default it is 32-bit in 32-bit code)
and by implicitly replacing calls to APIs like lseek with calls to

Support for _FILE_OFFSET_BITS=64 was not added to Android in a
single release. One API, lseek64, has always been in bionic. Most
APIs were added in Lollipop, and a few more were not added until later releases.

If you’re targeting a release that does not support the 64-bit
off_t variant of a function you are using and have set
_FILE_OFFSET_BITS=64, the function will not be available. This is
in contrast to the behavior for r15 and r15b (but matches r15c) where the
functions were wrongly exposed with a 32-bit off_t that would be
silently truncated.

Note that the 64-bit off_t APIs are still available without
_FILE_OFFSET_BITS=64 under different names. For example, instead of
lseek, call lseek64. Instead of off_t,
use off64_t.

Finally, since this feature is new to the NDK with unified headers, if you just
want to return to the pre-unified headers behavior, all you need to do is stop
setting _FILE_OFFSET_BITS=64.

For more information about off_t ABI details in bionic, see the Bionic
32-bit ABI bugs doc.

Android Developers Blog

Aug 22

Introducing Android 8.0 Oreo

Posted By: Dave Burke, VP of Engineering

After more than a year of development and months of testing by developers and early adopters (thank you!), we’re now ready to officially launch Android 8.0 Oreo to the world. Android 8.0 brings a ton of great features such as picture-in-picture, autofill, integrated Instant Apps, Google Play Protect, faster boot time, and much more.

We’re pushing the sources to Android Open Source Project (AOSP) for everyone to access today. Pixel and Nexus 5X/6P builds have entered carrier testing and we expect to start rolling out in phases over the next several weeks, alongside Pixel C and Nexus Player. Android Beta users will receive the update to the final version today and images are available to download and flash manually. We’ve been working closely with our partners over the last many months, and by the end of this year, hardware makers like Essential, Huawei, HTC, Kyocera, Motorola, HMD Global Home of Nokia Phones, Samsung, Sharp and Sony are scheduled to be launching or upgrading new devices to Android 8.0 Oreo.

What’s in Android Oreo?

In Android 8.0 Oreo we focused on creating fluid experiences that make Android even more powerful and easy to use, such as:

  • Picture-in-picture lets users manage two tasks simultaneously on any size screen, and it’s easy for apps to support it. (Shown at right)

  • Notification dots extend the reach of notifications and offer a new way to surface activity in your apps. Dots work with zero effort for most apps — we even extract the color of the dot from your icon.
  • Autofill framework simplifies how users set up a new device and synchronize their passwords. Apps using form data can optimize their apps for Autofill, and password manager apps can use the new APIs to make their services available to users in their favorite apps. Autofill will roll out fully over the next few weeks as part of an update to Google Play Services.

We also invested in Android Vitals, a project focused on optimizing battery life, startup time, graphics rendering, and stability, while giving developers better visibility over the health of their apps:

  • System optimizations: We worked across the system to help apps run faster and smoother — for example, in the runtime we added a new concurrent compacting garbage collection, code locality, and more.

  • Background limits: We added new limits on background location and wi-fi scans and changes in the way apps run in the background. These boundaries prevent unintentional overuse of battery and memory and apply to all apps — make sure you understand and account for these in your apps.
  • Complementary Android Vitals dashboards and IDE profilers: In the Play Console you can now see aggregate data about your app to help you pinpoint common issues – excessive crash rate, ANR rate, frozen frames, slow rendering, excessive wakeups, and more. You’ll also find new performance profilers in Android Studio 3.0, and new instrumentation in the platform.
In Android 8.0 your app can directly pin a specific app shortcut in the launcher to drive engagement (left). Notification dots keep users active in your app and let them jump directly to the app’s core functions (right).

For developers, Android Oreo includes many new capabilities to help you build better, more efficient apps. Here are just a few:

  • Autosizing textview: Use autosizing TextView to automatically fill a TextView with text, regardless of the amount. You can create an array of preset text sizes, or set min and max sizes with a step granularity, and the text will grow and shrink to fill the available TextView space.

  • Fonts in XML: Fonts are now a fully supported resource type. You can now use fonts in XML layouts and define font families in XML.
  • Downloadable fonts and emoji: With downloadable fonts you can load fonts from a shared provider instead of including them in your APK. The provider and support library manage the download of fonts and shares them across apps. The same implementation also supports downloadable emoji, so you can get updated emoji without being limited to the emoji built into the device.
  • Adaptive icons: You can now create adaptive icons that the system displays in different shapes, based on a mask selected by a device manufacturer. The system also animates interactions with the icons, and uses them in the launcher, shortcuts, settings, sharing dialogs, and in the overview screen.
Adaptive icons display in a variety of shapes across different device models.
  • Shortcut pinning: App shortcuts and homescreen widgets are great for engaging users and now you can let users add and pin shortcuts and widgets to the launcher from within your app. There’s also a new option to add a specialized activity to help users create shortcuts. The activity is complete with custom options and confirmation.

  • Wide-gamut color for apps: Imaging apps can now take full advantage of new devices that have a wide-gamut color capable display. To display wide gamut images, apps enable a flag in their manifest files (per activity) and load bitmaps with an embedded wide color profile (AdobeRGB, Pro Photo RGB, DCI-P3, etc.).
  • WebView enhancements: In Android Oreo, we’ve enabled WebView multiprocess mode by default and added an API to let your app handle errors and crashes. You can also opt in your app’s WebView objects to verify URLs through Google Safe Browsing.
  • Java 8 Language APIs and runtime optimizations: Android now supports several new Java Language APIs, including the new java.time API. In addition, the Android Runtime is faster than ever before, with improvements of up to 2x on some application benchmarks.

Learn more about these and other new features by visiting the Android 8.0 Oreo site on Also check out the What’s New in Android Oreo? video for an overview of new features for developers.

Make sure your apps are ready

If haven’t already, take a few moments today to test your apps and make sure they offer the experience you want for users upgrading to Android Oreo.

Just install your current app from Google Play onto a device or emulator
running Android Oreo and test the user flows. The app should run and look great,
and handle the Android Oreo behavior
changes properly. In particular, pay attention to background
location limits, notification
channels, and changes in networking,
and identifiers.

Once you’ve resolved any issues, publish your app updates to Google Play in your alpha, beta, or production channels so that they’re available as users start to receive Android 8.0 Oreo.

Speed your development with Android Studio

When you’re ready to build with new APIs in Android Oreo, we recommend updating to the latest version of Android Studio 3.0, available for download from the beta channel. Aside from improved app performance profiling tools, support for the Kotlin programming language, and Gradle build optimizations, Android Studio 3.0 makes it easier to develop with Instant Apps, XML Fonts, downloadable fonts, and adaptive icons.

Android Studio 3.0 includes tools for developing with Android Oreo features, such as previewing XML font resources in your app.

We also recommend updating to the Android Support Library 26.0.2, available now from Google’s Maven repository, and to the latest SDK, tools, and emulator system images, available in the SDK Manager.

If you’re just getting started building for Android Oreo, read the migration guide first. It gives you an overview of the process and the configuration changes you’ll need to make.

To compile against the official Android 8.0 APIs, update your project’s compileSdkVersion to API 26. We also recommend updating your app’s targetSdkVersion to API 26 to opt-in and test your app with Android Oreo specific behavior changes. See the migration guide for details on how to set up your environment to build with Android Oreo.

Publish your updates to Google Play

Google Play is open for apps compiled against or targeting API 26. When you’re ready, you can publish your APK updates in your alpha, beta, or production channels.

Make sure that your updated app runs well on Android Oreo as well as older versions. We recommend using Google Play’s beta testing feature to get early feedback from a small group of users, then do a staged rollout. We’re looking forward to seeing your app updates!

What’s next for Android Oreo?

We’ll soon be closing the Developer Preview issue tracker, but please keep the feedback coming! You can file a new issue against Android 8.0 in the AOSP issue tracker.

Thanks again to the many developers and early adopters who participated in the Android O Developer Preview and public beta. You gave us great feedback, and filed hundreds of issues that helped us to make the Android Oreo platform great for consumers and developers.

Android Developers Blog

Jun 10

Making the Internet safer and faster: Introducing reCAPTCHA Android API

Posted by Wei Liu, Product Manager

When we launched reCAPTCHA ten years ago, we had a simple goal: enable users to
visit the sites they love without worrying about spam and abuse. Over the years,
reCAPTCHA has changed quite a bit. It evolved from the distorted text to street
numbers and names, then No
CAPTCHA reCAPTCHA in 2014 and Invisible reCAPTCHA in March this year.

By now, more than a billion users have benefited from reCAPTCHA and we continue
to work to refine our protections.

reCAPTCHA protects users wherever they may be online. As the use of mobile
devices has grown rapidly, it’s important to keep the mobile applications and
data safe. Today, on reCAPTCHA’s tenth birthday, we’re glad to announce the
first reCAPTCHA Android
API as part of Google Play Services.

With this API, reCAPTCHA can better tell human and bots apart to provide a
streamlined user experience on mobile. It will use our newest Invisible
reCAPTCHA technology, which runs risk analysis behind the scene and has enabled
millions of human users to pass through with zero click everyday. Now mobile
users can enjoy their apps without being interrupted, while still staying away
from spam and abuse.

reCAPTCHA Android API is included with Google SafetyNet,
which provides services like device attestation and safe browsing to protect
mobile apps. Mobile developers can do both the device and user attestations in
the same API to mitigate security risks of their apps more efficiently. This
adds to the diversity
of security protections on Android: Google Play
Protect to monitor for potentially harmful applications, device encryption,
and regular security updates. Please visit our site
to learn more about how to integrate with the reCAPTCHA Android API, and keep an
eye out for our iOS library.

The journey of reCAPTCHA continues: we’ll make the Internet safer and easier to
use for everyone (except bots).

Android Developers Blog

May 21

Introducing a New Guide, “The Secrets to App Success on Google Play”

By Dom Elliott, Google Play team

With more than 50 billion apps and games downloaded in total, Google Play is helping developers and content creators around the world build successful businesses. In fact, we paid out more than $ 5 billion over the last year to developers for creating incredible apps that are changing the way people communicate, live, work, and play.

Developing an app or game and distributing it on Google Play is a good start, but it’s only the first step to building a sustainable business. That’s why we’ve written “The Secrets to App Success on Google Play,” a detailed playbook on the best practices and tools you can use to maximize the reach, retention, and revenue of your new app.

The guide is separated into the following sections:

  • Publishing on Google Play — using the Google Play Developer Console to distribute your app to over 1 billion Android users worldwide.
  • Quality — The fundamentals of building a great app and an insight into the Google Play guidelines and policies.
  • Discoverability & reach — Maximizing your app’s discoverability and reaching the widest audience possible.
  • Engagement & retention — Converting installations into active users and improving user retention.
  • Monetization — Monetization strategies to generate ongoing, growing revenue streams.
  • Measurement with Google Analytics — Understanding your users and improving your app experience, conversions, and marketing.
  • Going global — Launching your app in local markets around the world.

Download the guide now in English (PDF, 11MB) or get it on Google Play. We’ll release the guide in more languages in the coming months. If you’re in the US or the UK, we also have a limited number of printed copies that we are offering to send for free. Request a printed copy here.

Once you’ve checked out the guide, we’d love to hear your feedback so we can continue to improve, let us know what you think.

Join the discussion on

+Android Developers

Android Developers Blog

Mar 29

Introducing a New Course on Developing Android Apps for Auto

Posted by Wayne Piekarski, Developer Advocate

Android Auto brings the Android platform to the car in a way that’s optimized for the driving experience, allowing the user to keep their hands on the wheel, and their eyes on the road. To learn how to extend your existing media and messaging apps to work within a car, we collaborated with Udacity to introduce a new course on Ubiquitous Computing with Android Auto.

Designed by Developer Advocates from Google, the course shows you how to take advantage of your existing Android knowledge to work on this new platform. The best part is that Android Auto is based on extensions to the regular Android framework, so you don’t need to rewrite your existing apps to support it. You’ll learn how to implement messaging apps, by using Notification extensions. You’ll also learn how audio players just work on Android Auto when you use the Android media APIs. In both cases, we work through some simple Android samples, and then show what changes are needed to extend them for Android Auto. Finally, we show a complete music playing sample, and how it works across other platforms like Android Wear.

If you have an interest in Android-based messaging or media apps, then you need to learn about Android Auto. Users want to be able to take their experience to other places, such as their cars, and not just on their phones. Having Auto support will allow you to differentiate your app, and give users another reason to try it.

This class is part of our larger series on Ubiquitous Computing across Google platforms, such as Android Wear, Android Auto, Android TV, and Google Cast. Designed as short, standalone courses, you can take any course on its own, or take them all! The Android Auto platform is a great opportunity to add functionality that will distinguish your app from others. This Udacity course will get you up to speed quickly with everything you need to get started.

Get started now and try it out at no cost, your users are waiting!

Android Developers Blog

Mar 22

Introducing Android Native Development Kit r14

Posted by Dan Albert, Android NDK Tech Lead

Android NDK r14

The latest version of the Android Native Development Kit (NDK), Android NDK r14,
is now available for download. It
is also available in the SDK manager via Android Studio.

So what’s new in r14? The full changelog can be seen here, but the
highlights include the following:

  • Updated all the platform headers to unified headers (covered in detail
  • LTO with Clang now works on Darwin and Linux
  • libc++ has been updated. You can now use thread_local for statics with
    non-trivial destructors (Clang only)
  • RenderScript is back!

Unified Headers

We’ve completely redone how we ship platform header files in the NDK. Rather
than having one set of headers for every target API level, there’s now a single
set of headers. The availability of APIs for each Android platform is guarded in
these headers by #if __ANDROID_API__ >= __ANDROID_API_FOO__ preprocessor

The prior approach relied on periodically-captured snapshots of the platform
headers. This meant that any time we fixed a header-only bug, the fix was only
available in the latest version aside from the occasional backport. Now bugfixes
are available regardless of your NDK API level.

Aside from bugfixes, this also means you’ll have access to modern Linux UAPI
headers at every target version. This will mostly be important for people
porting existing Linux code (especially low-level things). Something important
to keep in mind: just because you have the headers doesn’t mean you’re running
on a device with a kernel new enough to support every syscall. As always with
syscalls, ENOSYS is a possibility.

Beyond the Linux headers, you’ll also have modern headers for OpenGL, OpenSLES,
etc. This should make it easier to conditionally use new APIs when you have an
older target API level. The GLES3 headers are now accessible on Ice Cream
Sandwich even though that library wasn’t available until KitKat. You will still
need to use all the API calls via dlopen/dlsym, but you’ll at least have
access to all the constants and #defines that you would need for invoking
those functions.

Note that we’ll be removing the old headers from the NDK with r16, so the sooner
you file bugs, the smoother the transition will go.


The API #ifdef guards do not exist in third-party headers like those found in
OpenGL. In those cases you’ll receive a link time error (undefined reference)
rather than a compile time error if you use an API that is not available in your
targeted API level.

Standalone toolchains using GCC are not supported out of the box (nor will they
be). To use GCC, pass -D__ANDROID_API__=$ API when compiling.

Enabling Unified Headers in Your Build

To ease the transition from the legacy headers to the unified headers, we
haven’t enabled the new headers by default, though we’ll be doing this in r15.
How you opt-in to unified headers will depend on your build system.


In your


You can also set this property from the command-line like this:

    $   ndk-build APP_UNIFIED_HEADERS=true

If you’re using ndk-build via Gradle with externalNativeBuild, specify the
following configuration settings in build.gradle:

    android {
      defaultConfig {
        externalNativeBuild {
          ndkBuild {
            arguments "APP_UNIFIED_HEADERS=true"


When configuring your build, set ANDROID_UNIFIED_HEADERS=ON. This will usually
take the form of invoking CMake with cmake -DANDROID_UNIFIED_HEADERS=ON

If you’re using CMake via Gradle with externalNativeBuild, you can use:

    android {
      defaultConfig {
        externalNativeBuild {
          cmake {
            arguments "-DANDROID_UNIFIED_HEADERS=ON"

Standalone Toolchains

When creating your standalone toolchain, pass –unified-headers. Note that
this option is not currently available in the legacy script,, but only in

Experimental Gradle Plugin

Coming soon! Follow along here.

Custom Build System?

We’ve got you covered. Instructions on adding support for unified headers to
your build system can be found here.

For additional information about unified headers, see our docs and the tracking bug. If you’re looking ahead to future releases, the most up-to-date version of the
documentation is in the master branch.

Android Developers Blog

Mar 17

Introducing the Tech Entrepreneur Nanodegree

Originally posted on Google Developers Blog

Posted by Shanea King-Roberson, Program Manager

As a developer, writing your app is important. But even more important is getting it into the hands of users. Ideally millions of users. To that end, you can now learn what it takes to design, validate, prototype, monetize, and market app ideas from the ground up and grow them into a scalable business with the new Tech Entrepreneur Nanodegree.

Designed by Google in partnership with Udacity, the Tech Entrepreneur Nanodegree, takes 4-7 months to complete. We have teamed up with most successful thought leaders in this space to provide students with a unique and battle-tested perspective. You’ll meet Geoffrey Moore, author of “Crossing the Chasm”, Pete Koomen, co-founder of Optimizely; Aaron Harris and Kevin Hale, Partners at Y-Combinator; Nir Eyal, author of the book “Hooked: How to build habit forming products” and co-founder of Product Hunt; Steve Chen, Co-Founder of YouTube, and many more.

All of the content that make up this nanodegree is available online for free at In addition, Udacity provides paid services, including access to coaches, guidance on your project, help staying on track, career counseling, and a certificate when you complete the nanodegree.

The Tech Entrepreneur offering will consist of the following courses:

  • Product Design: Learn Google’s Design Sprint methodology, Ideation & Validation, UI/UX design and gathering the right metrics.
  • Prototyping: Experiment with rapid-low and high-fidelity prototyping on mobile and the web using online tools.
  • Monetization: Learn how to monetize your app and how to set up an effective payment funnel.
  • App Marketing: Understand your market, analyze competition, position your product, prepare for launch, acquire customers and learn growth hacks.
  • How to get your startup started: Find out whether you really need venture capital funding, evaluate build vs. buy, and learn simple ways to monitor and maintain your startup business effectively.

Pitch your ideas in front of Venture Capitalists

Upon completion, students will receive a joint certificate from Udacity and Google. The top graduates will also be invited to an exclusive pitch event, where they will have the opportunity to pitch their final product to venture capitalists at Google.

Android Developers Blog