1. readobject error: Java. Lang. classnotfoundexception. Solution: the package names of the server and client are the same.
2. If the class is modified, the string ID error will be reported when reading the object.
3. the SDK of a higher version has higher requirements for network connection. You must add it to oncreate.Code:
Strictmode. setthreadpolicy (New strictmode. threadpolicy. builder (). detectdiskreads (). detectdiskwrites (). detectnetwork () // or //. detectall () // For // All // detectable // problems. penaltylog (). build (); strictmode. setvmpolicy (New strictmode. vmpolicy. builder (). detectleakedsqlliteobjects (). detectleakedclosableobjects (). penaltylog (). penaltydeath (). build ());
4. Report exception information
Java. Io. streampolicuptedexception
I accidentally used socket to get the inputstream twice.
Write it down first, and I will discuss it in detail later...