IncompatibleClassChangeError com.google.gson.annotations.SerializedName.value
<p>We are getting <code>IncompatibleClassChangeError</code> in <em>Samsung</em> device when user update app from Play Store. Please check below log.</p>

<pre><code>java.lang.IncompatibleClassChangeError: Couldn't find com.google.gson.annotations.SerializedName.value
at libcore.reflect.AnnotationAccess.toAnnotationInstance(AnnotationAccess.java:659)
at libcore.reflect.AnnotationAccess.toAnnotationInstance(AnnotationAccess.java:641)
at libcore.reflect.AnnotationAccess.getDeclaredAnnotation(AnnotationAccess.java:170)
at java.lang.reflect.Field.getAnnotation(Field.java:242)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getFieldName(ReflectiveTypeAdapterFactory.java:71)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getFieldName(ReflectiveTypeAdapterFactory.java:67)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:142)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:83)
at com.google.gson.Gson.getAdapter(Gson.java:359)
at com.google.gson.Gson.fromJson(Gson.java:809)
at com.google.gson.Gson.fromJson(Gson.java:775)
at com.google.gson.Gson.fromJson(Gson.java:724)
at com.google.gson.Gson.fromJson(Gson.java:696)
at com.cubii.utils.SessionManager.getUserID(SessionManager.java:70)
at com.cubii.BluetoothLeService.broadcastUpdate(BluetoothLeService.java:188)
at com.cubii.BluetoothLeService.access$400(BluetoothLeService.java:47)
at com.cubii.BluetoothLeService$1.onCharacteristicChanged(BluetoothLeService.java:139)
at android.bluetooth.BluetoothGatt$1.onNotify(BluetoothGatt.java:443)
at android.bluetooth.IBluetoothGattCallback$Stub.onTransact(IBluetoothGattCallback.java:399)`enter code here`
at android.os.Binder.execTransact(Binder.java:446)
</code></pre>

<p>And code is as below:</p>

<pre><code>public int getUserID(){
    try {
        String json = preferences.getString("User", "");

        LoginResponse loginResponse = new Gson().fromJson(json, LoginResponse.class);//getting error from this line

        Integer id = 0;
        if (loginResponse != null) {
            if (loginResponse.getId() != null) {
                id = loginResponse.getId();
            } else {
                id = loginResponse.getUserId();
            }
        }

        return (id == null) ? 0 : id;
    }catch (Exception e){
        Logger.dump(e);
    }
    return 0;
}
</code></pre>

<p><strong>LoginResponse</strong> is my POJO class.</p>

<pre><code>preferences.getString("User", "")
</code></pre>

<p>will return JSON String which is Server response.</p>