Sunday, 15 April 2012

java - Getting a class not found exception / noclassdeffound error on some Android devices -



java - Getting a class not found exception / noclassdeffound error on some Android devices -

i have class implements parcelable, throwing me noclassdeffounderror class not found exception on devices. have gotten error on samsung android devices. on nexus 5, nexus 4 , android emulators works should not on samsung reason. have tested on samsung remote test lab not have samsung device debugging.

also class in question nil special. simple class longs, string , int written/read parcel. checked order same when reading , writing. additionally, class not referenced library.

error 06-23 09:14:13.578 892 1507 parcel class not found when unmarshalling: path.class error 06-23 09:14:13.578 892 1507 parcel caused by: java.lang.noclassdeffounderror: path/class error 06-23 09:14:13.578 892 1507 parcel caused by: java.lang.classnotfoundexception: didn't find class "path.class" on path: dexpathlist[[directory "."],nativelibrarydirectories=[/vendor/lib, /system/lib]]

code parcelable part of class.

public class sprint implements parcelable { private long mstarttime; private long mendtime; private int mdaysinsprint; private string msprinttitle; private int mid; private sprint(parcel source) { mstarttime = source.readlong(); mendtime = source.readlong(); mdaysinsprint = source.readint(); msprinttitle = source.readstring(); mid = source.readint(); } public static final parcelable.creator<sprint> creator = new parcelable.creator<sprint>() { @override public sprint createfromparcel(parcel source) { homecoming new sprint(source); } @override public sprint[] newarray(int size) { homecoming new sprint[size]; } }; @override public int describecontents() { homecoming hashcode(); } @override public void writetoparcel(parcel dest, int flags) { dest.writelong(mstarttime); dest.writelong(mendtime); dest.writeint(mdaysinsprint); dest.writestring(msprinttitle); dest.writeint(mid); }

this error may cause because of api version compatibility. please check , utilize latest version of api. not sure per knowledge reason

java android samsung-mobile

No comments:

Post a Comment