NNAPI Migration Guide

The Neural Networks API (NNAPI) will be deprecated in Android 15. It was introduced in Android 8.1 to provide a unified interface for hardware accelerated inference for on-device machine learning.

Since NNAPI's release, the field of on-device machine learning (ODML) has advanced rapidly. Breakthroughs such as transformer and diffusion models, along with the ongoing high rate of innovation in this field, mean that developers need tools and infrastructure that update frequently.

To meet these needs, Google has developed TensorFlow Lite in Play Services, providing an updatable TensorFlow runtime for custom on-device ML models, and AICore, which provide GenAI foundation models like Gemini Nano directly on Android devices. To provide greater clarity on the recommended paths for production ML on Android, NNAPI (Neural Networks API) will be marked as deprecated starting in Android 15.

To migrate from NNAPI, see the instructions for TensorFlow Lite in Google Play Services and optionally TFLite GPU delegate for hardware acceleration.