Skip to content

fix(android): build error with minification enabled#135

Closed
mbpictures wants to merge 1 commit intomrousavy:mainfrom
mbpictures:patch-2
Closed

fix(android): build error with minification enabled#135
mbpictures wants to merge 1 commit intomrousavy:mainfrom
mbpictures:patch-2

Conversation

@mbpictures
Copy link
Copy Markdown
Contributor

release build fails on android with minification enabled.

Error: R8: Missing class org.tensorflow.lite.gpu.GpuDelegateFactory$Options

build failed on android with this error: R8: Missing class org.tensorflow.lite.gpu.GpuDelegateFactory$Options
@mrousavy
Copy link
Copy Markdown
Owner

mrousavy commented Apr 7, 2025

is this still valid?

@Sid110307
Copy link
Copy Markdown

Yes. This still occurs with R8 enabled.

@CatUnderTheLeaf
Copy link
Copy Markdown

I can also confirm that attempt to make a release build for android with R8 minification enabled fails.

Adding to the android/app/build.gradle file:

dependencies {
    implementation "com.google.ai.edge.litert:litert-gpu-api:1.0.1"
}

solves the problem.

For Expo managed app there is a workaround until, hopefully, this fix will be merged, - add a custom plugin to include this dependency.

@mrousavy
Copy link
Copy Markdown
Owner

Hi - thanks for the PR - we recently migrated the library to Nitro and upgraded it to latest LiteRT, so I think this PR is quite out of sync now - sorry for not getting it merged sooner.

I'm going to close this for now, but if this is still relevant in the latest version, we can open another PR and get it merged. 👍

@mrousavy mrousavy closed this Apr 21, 2026
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.

4 participants