Skip to content

Running into Missing class org.tensorflow.lite.gpu.GpuDelegateFactory$Options when building an APK #278

@dorianbrown

Description

@dorianbrown

I've been putting together a prototype for a tflite model, and although the app is running smoothly in the emulator, I'm running into this error message when trying to build an apk file.

ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in /home/dorian/StudioProjects/hello_world/build/app/outputs/mapping/release/missing_rules.txt.
ERROR: R8: Missing class org.tensorflow.lite.gpu.GpuDelegateFactory$Options (referenced from: void org.tensorflow.lite.gpu.GpuDelegate.<init>() and 1 other context)

FAILURE: Build failed with an exception.
...

I've tried a number of things, but so far nothing has helped. It seems to be a missing dependency, but it's unclear to me what to add. Also adding tensorflow to proguard-rules.pro didn't help either.

Anyone else ran into this and solved it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions