Skip to content

Conversation

@bhanuka96
Copy link
Contributor

Critical: Fix for Google Play 16KB Compliance

Version 0.12.0 claimed to support 16KB page sizes, but Google Play Store is still rejecting apps because the native TensorFlow Lite libraries lack proper 16KB alignment. This PR provides the actual fix by migrating to LiteRT 1.4.0.

The Problem with v0.12.0

While v0.12.0 updated build tools and infrastructure, it continued using TensorFlow Lite 2.12.0 (released in 2022), which contains prebuilt native libraries compiled with 4KB page alignment:

  • libtensorflowlite_jni.so - 4KB aligned
  • libtensorflowlite_gpu_jni.so - 4KB aligned

These prebuilt binaries cannot be recompiled with linker flags. The libraries must come from a version that was compiled with 16KB support from the source.

The Solution: LiteRT 1.4.0

This PR migrates from TensorFlow Lite to Google AI Edge LiteRT 1.4.0, which is Google's official successor to TensorFlow Lite and includes native libraries compiled with proper 16KB page alignment.

What Changed

Before (v0.12.0):

  dependencies {
      def tflite_version = "2.12.0"
      implementation("org.tensorflow:tensorflow-lite:${tflite_version}")
      implementation("org.tensorflow:tensorflow-lite-gpu:${tflite_version}")
  }

After (v0.12.1):

  dependencies {
      def litert_version = "1.4.0"
      implementation("com.google.ai.edge.litert:litert:${litert_version}")
      implementation("com.google.ai.edge.litert:litert-gpu:${litert_version}")
  }

References

- Replace TensorFlow Lite 2.12.0 with LiteRT 1.4.0
- TFLite 2.12.0 (from 2022) lacks 16KB aligned native libraries
- LiteRT 1.4.0 provides proper 16KB page alignment
- Bump version to 0.12.1
@bhanuka96 bhanuka96 force-pushed the fix/16kb-litert-migration branch from 47962eb to 9f69578 Compare October 28, 2025 15:56
@bhanuka96
Copy link
Contributor Author

@PaulTR Could you please review, merge, and publish v0.12.1 to pub.dev as soon as possible? Developers using v0.12.0 are blocked from submitting to Google Play with the November 1st deadline approaching.

Critical Issue with v0.12.0

After publishing v0.12.0, developers are reporting that Google Play still rejects apps for 16KB incompatibility. The issue: v0.12.0 uses TensorFlow Lite 2.12.0 (from 2022), which has 4KB-aligned native libraries that cannot be fixed with build flags.

The Fix

This PR migrates to LiteRT 1.4.0 - Google's official TensorFlow Lite successor with proper 16KB-aligned native libraries. I've tested this and confirmed Google Play no longer shows 16KB warnings.

Thank you

@PaulTR PaulTR merged commit 85fb92e into tensorflow:main Oct 28, 2025
2 checks passed
@PaulTR
Copy link
Collaborator

PaulTR commented Oct 28, 2025

Alright give 0.12.1 a shot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants