Skip to content

Commit 19ae3b0

Browse files
david-allisonlukstbit
authored andcommitted
fix: ACRA crash reporting
Cause: 0da67f4 Moving to a `java-library` bundled a second copy of `org.json` which uses an incompatible `JSONWriter`. On a release build, R8 inlining causes a crash. `compileOnly` ensures the JAR is not copied over, and the Android `org.json` implementation is used Fixes 20852 Assisted-by: Claude Opus 4.7 - explaining the bug
1 parent c95416c commit 19ae3b0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

common/build.gradle.kts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ kotlin {
1717
}
1818

1919
dependencies {
20-
implementation(libs.json)
20+
// #20852: JSON must be compile-time only: Bundling `org.json:json` into the APK ships a second
21+
// copy with a different field schema (vs the system version in `android.jar`)
22+
compileOnly(libs.json)
23+
testImplementation(libs.json)
2124
implementation(libs.androidx.annotation)
2225
implementation(libs.slf4j.api)
2326

0 commit comments

Comments
 (0)