library : "com.google.code.gson:gson:2.8.5"
gradle : 'com.android.tools.build:gradle:3.2.1'
The problem occurs when the app is built with compileSdkVersion 28 and runs on an Android 9 device.
The Camera.Parameters object can't be serialized. An already seirialized instance of this object (created when the app was build with compileSdkVersion 27 and stored as a file) is deserialized into an Camera.Parameters object without the private fields set correctly.
Perhaps the problem is related to the behavioral changes of Android 9 mentioned here. In that case, is there a workaround?
You need to write your own type adapter using the public API. You should
never serialize the private members of types you don't control.
On Tue, Nov 13, 2018, 11:17 AM Petros Douvantzis <[email protected]
wrote:
library : "com.google.code.gson:gson:2.8.5"
gradle : 'com.android.tools.build:gradle:3.2.1'The problem occurs when the app is built with compileSdkVersion 28 and
runs on an Android 9 device.The Camera.Parameters
https://developer.android.com/reference/android/hardware/Camera.Parameters
object can't be serialized. An already seirialized instance of this object
(created when the app was build with compileSdkVersion 27 and stored as a
file) is deserialized into an Camera.Parameters object without the private
fields set correctly.Perhaps the problem is related to the behavioral changes of Android 9
mentioned here
https://developer.android.com/about/versions/pie/restrictions-non-sdk-interfaces.
In that case, is there a workaround?—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/google/gson/issues/1427, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAEEEdyCKHbgDt0ZxS2vYkMT_jyLCxlXks5uuvCrgaJpZM4Yb_-7
.
Most helpful comment
You need to write your own type adapter using the public API. You should
never serialize the private members of types you don't control.
On Tue, Nov 13, 2018, 11:17 AM Petros Douvantzis <[email protected]
wrote: