Minimal reproduction of an unexplained issue described in Issue Tracker 283422335.
- Sync and run the application in both
debug
andrelease
variants. - Comment out / remove the dependency on
com.pubnub:pubnub-kotlin:7.4.2
in:module-b
.- This pulls in
org.json:json:20230227
transitively.
- This pulls in
- Sync and run the application in both
debug
andrelease
variants.
org.json.JSONObject
from the Android platform is used in all four cases.
org.json.JSONObject
from the Android platform is only used in the following cases:
debug
with PubNub dependency.debug
without PubNub dependency.release
without PubNub dependency.
However in the following case (the most important one) org.json.JSONObject
comes from
and external library dependency.
As noted in the issue report the behaviour of JSONObject::getString
with respect to null
values is different between the Android Platform version and the external library version.
This behaviour difference can cause application crashes which can be very difficult to understand
since Android Studio takes you to the Android Platform version of JSONOBject
.
This is probably some weird Proguard / R8 issue here or a niche issue in our project setup.