Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ android {
} else {
signingConfigs.getByName("debug")
}
// Keep rules for libraries that R8 cannot trace (ONNX Runtime
// reaches its Java classes from native code by name).
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
}
}
}
Expand Down
8 changes: 8 additions & 0 deletions app/android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# ONNX Runtime's native library looks up its Java classes by name over JNI
# (ai/onnxruntime/TensorInfo and friends). R8 cannot see those uses, so in
# release builds it removed TensorInfo and renamed others. The first search
# by meaning then aborted the app with "JNI DETECTED ERROR: java_class ==
# null" in convertToTensorInfo (Play vitals, 1.0.61+79, 2026-10-21).
# Keep the whole package exactly as shipped.
-keep class ai.onnxruntime.** { *; }
-keepclassmembers class ai.onnxruntime.** { *; }
Loading