1

I have used android.graphics.paint in Myclass and now i want to serialize Myclass to file, but I'm getting android.graphics.Paint is not Serializable Exception

this is because android.graphics.paint does not implements serializable interface

is there any way that i can serialize Myclass to file?

Anoop M Maddasseri
  • 10,213
  • 3
  • 52
  • 73
Jayanth
  • 5,954
  • 3
  • 21
  • 38
  • 2
    mark the painter object as transient. It will be excluded from the serialization – Blackbelt Nov 27 '15 at 10:39
  • 1
    Possible duplicate of [Java Serialization with non serializable parts](http://stackoverflow.com/questions/95181/java-serialization-with-non-serializable-parts) – Petter Friberg Nov 27 '15 at 10:41
  • Here that has helped me http://stackoverflow.com/questions/8641434/serialization-in-android – Rida Am Dec 11 '15 at 18:18

0 Answers0