Repository navigation
android: keep ONNX Runtime classes so search by meaning stops crashing - #77
Merged
Merged
Conversation
R8 removed ai.onnxruntime.TensorInfo from release builds because only
native code uses it, by name, over JNI. The first meaning search on a
phone with vectors aborted the app ("JNI DETECTED ERROR: java_class ==
null" in convertToTensorInfo). Seen in Play vitals on 1.0.61+79,
Galaxy S21 Ultra, Android 15. The 1.0.61 mapping file confirms
TensorInfo is gone and OrtUtil was renamed.
Add a keep rule for the whole ai.onnxruntime package.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phones on 1.0.61+79 crash on their first search by meaning once they have vectors from a computer.
Cause. R8 strips
ai.onnxruntime.TensorInfofrom the release build because only ONNX Runtime's native code uses it, by name over JNI.OrtSession.runthen aborts withJNI DETECTED ERROR IN APPLICATION: java_class == nullinconvertToTensorInfo. Play vitals shows it on a Galaxy S21 Ultra, Android 15, 4 events on 2026-10-21. The 1.0.61 mapping file confirms TensorInfo is missing and OrtUtil was renamed. It hid during testing because the phone only runs the encoder when the vault has vectors, and vectors arrived with desktop 1.0.60.Fix. Keep the whole
ai.onnxruntimepackage in release builds.Verify before tagging 1.0.64. Build the release AAB and check
build/app/outputs/mapping/release/mapping.txthasai.onnxruntime.TensorInfo -> ai.onnxruntime.TensorInfo. Not built yet because another session holds Flutter on the build box.🤖 Generated with Claude Code