Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mbpictures
Copy link
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
Owner

mrousavy commented Apr 7, 2025

is this still valid?

@Sid110307
Copy link

Yes. This still occurs with R8 enabled.

@CatUnderTheLeaf
Copy link

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.

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