Ich bin seit dem 15. April mit quickblox konfrontiert, als Quickblox SDK for Android auf 2.5.2 aktualisiert hat. Das Problem, das ich bemerkte, ist wie, wenn ich customData Parameter für einen Dialog gefüllt haben, dann wirft es die IOExeption, die unten erwähnt wird. sonst keine Probleme.Parcelable hat IOException beim Schreiben von serialisierbarem Objekt entdeckt [QUICKBLOX DIALOG]
Dialog, der keine Probleme verursacht.
QBDialog {id = xxxx, created_at = 2016-19-04 11.36.54, last_msg_user_id = xxxx, occupants_ids = [xxxx, xxxx, last_message = He, last_message_date_sent = 1461046124, type = PRIVATE , name = xxxx, room_jid = null, user_id = xxxx, Foto = null, unread_message_count = 0, custom = null}
Dialog, der Absturz verursacht.
QBDialog {id = xxxx, created_at = 2016-19-04 12.01.00, last_msg_user_id = xxxx, occupants_ids = [xxxx, xxxx], last_message = Hallo, last_message_date_sent = 1461047494, type = PRIVATE, name = xxxx, room_jid = null, user_id = xxxx, Foto = null, unread_message_count = 1, custom = QBBaseCustomObject {classname = 'DialogueRelationState', Felder = {isFriends = true, location_field = null}}}
Code-Segment, das Dialoge wie oben an Activity_c übergibt Hut Klasse
Bundle bundle = new Bundle();
bundle.getString(selectedDialog.toString());
bundle.putSerializable(Activity_Chat.EXTRA_DIALOG, selectedDialog);
Activity_Chat.start(DrawActivity_Chatlist.this, bundle);// error points here
Startverfahren des Empfangsaktivität
public static void start(Context context, Bundle bundle) {
Intent intent = new Intent(context, Activity_Chat.class);
intent.putExtras(bundle);
context.startActivity(intent); //error points here
}
Fehlerprotokoll:
Fatal Exception: java.lang.RuntimeException: Parcelable encountered IOException writing serializable object (name = com.quickblox.chat.model.QBDialog)
at android.os.Parcel.writeSerializable(Parcel.java:1323)
at android.os.Parcel.writeValue(Parcel.java:1271)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:618)
at android.os.Bundle.writeToParcel(Bundle.java:1692)
at android.os.Parcel.writeBundle(Parcel.java:643)
at android.content.Intent.writeToParcel(Intent.java:7152)
at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:2663)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1419)
at android.app.Activity.startActivityForResult(Activity.java:3532)
at android.app.Activity.startActivityForResult(Activity.java:3458)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:784)
at android.app.Activity.startActivity(Activity.java:3780)
at android.app.Activity.startActivity(Activity.java:3748)
at com.social.fitspur.activities.Activity_Chat.start(Activity_Chat.java:100)
at com.social.fitspur.activities.DrawActivity_Chatlist$3.onItemClick(DrawActivity_Chatlist.java:198)
at android.widget.AdapterView.performItemClick(AdapterView.java:299)
at android.widget.AbsListView.performItemClick(AbsListView.java:1162)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:2953)
at android.widget.AbsListView$3.run(AbsListView.java:3708)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:149)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
at dalvik.system.NativeStart.main(NativeStart.java)
Caused by java.io.NotSerializableException: org.json.JSONObject$1
at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1366)
at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1673)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1519)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1483)
at java.util.HashMap.writeObject(HashMap.java:995)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java:1055)
at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1406)
at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1673)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1519)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeFieldValues(ObjectOutputStream.java:981)
at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:368)
at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java:1076)
at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1406)
at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1673)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1519)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeFieldValues(ObjectOutputStream.java:981)
at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:368)
at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java:1076)
at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1406)
at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1673)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1519)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1483)
at android.os.Parcel.writeSerializable(Parcel.java:1318)
at android.os.Parcel.writeValue(Parcel.java:1271)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:618)
at android.os.Bundle.writeToParcel(Bundle.java:1692)
at android.os.Parcel.writeBundle(Parcel.java:643)
at android.content.Intent.writeToParcel(Intent.java:7152)
at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:2663)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1419)
at android.app.Activity.startActivityForResult(Activity.java:3532)
at android.app.Activity.startActivityForResult(Activity.java:3458)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:784)
at android.app.Activity.startActivity(Activity.java:3780)
at android.app.Activity.startActivity(Activity.java:3748)
at com.social.fitspur.activities.Activity_Chat.start(Activity_Chat.java:100)
at com.social.fitspur.activities.DrawActivity_Chatlist$3.onItemClick(DrawActivity_Chatlist.java:198)
at android.widget.AdapterView.performItemClick(AdapterView.java:299)
at android.widget.AbsListView.performItemClick(AbsListView.java:1162)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:2953)
at android.widget.AbsListView$3.run(AbsListView.java:3708)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:149)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
at dalvik.system.NativeStart.main(NativeStart.java)
, was ich von diesem zu verstehen ist, ist es etwas wie JSON Begegnungen in der Dialog, der nicht serialisierbar ist und daher der Fehler.
HINWEIS: Diese arbeitet vor dem 15. April in Ordnung, und ich habe keine Änderungen an meine benutzerdefinierten Klasse zu
Ich habe SDK Version versucht, ein Upgrade von v2.5 auf v2.5.2 nicht gemacht, aber keine Verwendung .
Ich bin die gleiche Ausnahme gegenüber, aber ich weiß nicht, wo kann ich den vorherigen Code hinzufügen, das Problem mit mir geschehen, wenn Ich versuche einen neuen Dialog zu erstellen. –
Welchen vorherigen Code sprechen Sie? Dieses obige Problem tritt nur auf, wenn Sie dem Dialogfeld benutzerdefinierte Daten hinzufügen. Sonst nicht – Veer3383