NNAPI Migration Guide
Stay organized with collections
Save and categorize content based on your preferences.
The Neural Networks API (NNAPI) is deprecated. It was
introduced in Android 8.1 to provide a unified interface for hardware
accelerated inference for on-device machine learning,
and deprecated in Android 15.
After NNAPI's release, the field of on-device machine learning (ODML)
advanced rapidly. Breakthroughs such as transformer and diffusion models,
along with the high rate of innovation in the field meant that
developers needed tools and infrastructure that update frequently.
To meet those needs, Google 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)
was deprecated.
To migrate from NNAPI, see the instructions for
TensorFlow Lite in Google Play Services
and optionally TFLite GPU delegate for hardware acceleration.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-04-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-07 UTC."],[],[],null,["# NNAPI Migration Guide\n\nThe Neural Networks API (NNAPI) is deprecated. It was\n[introduced in Android 8.1](/about/versions/oreo/android-8.1#nnapi) to provide a unified interface for hardware\naccelerated inference for on-device machine learning,\nand deprecated in Android 15.\n\nAfter NNAPI's release, the field of on-device machine learning (ODML)\nadvanced rapidly. Breakthroughs such as transformer and diffusion models,\nalong with the high rate of innovation in the field meant that\ndevelopers needed tools and infrastructure that update frequently.\n\nTo meet those needs, Google developed\n[TensorFlow Lite in Play Services](https://www.tensorflow.org/lite/android/play_services),\nproviding an updatable TensorFlow runtime for custom on-device ML models,\nand [AICore](/ml/aicore), which provide GenAI foundation models like\nGemini Nano directly on Android devices. To provide greater clarity on\nthe recommended paths for production ML on Android, NNAPI (Neural Networks API)\nwas deprecated.\n\nTo migrate from NNAPI, see the instructions for\n[TensorFlow Lite in Google Play Services](https://www.tensorflow.org/lite/android/play_services)\nand optionally [TFLite GPU delegate](https://www.tensorflow.org/lite/android/delegates/gpu) for hardware acceleration."]]