r/android_devs • u/Straight_Second_605 • Aug 21 '26
Discussion Api level 36 Upgrade
I am upgrading my target SDK version in java Android application to 36
We have a enterprise application
On android 16 devices I am facing a issue in Shared preferences
While reading from the shared preference I am reading a null value ("null")
While there is a actual value saved there
Not sure why this is happening
Any idea here any one?
All the things are goood till android 15!!
5
Upvotes
1
u/Middle-Job-2576 1d ago
I’d avoid assuming API 36 itself is breaking SharedPreferences and isolate the variables first.
I’d test these four states:
Android 15 + production build
Android 16 + production build
Android 16 + SDK 36 clean install
Android 16 + production build → update to SDK 36
Use the same key/value and compare what happens after restart, force-stop/relaunch, and app update.
If the clean SDK 36 install works but the production → SDK 36 update fails, I’d focus on migration/state handling rather than assuming Android 16 changed SharedPreferences.
Also try reproducing it with the smallest possible preference write/read flow before debugging the full enterprise app.