No Class Def Found Error org.apache.ContentType (Android Studio) -
good day.i done heaps of researches , used every answer found nothing helped!im trying upload simple image php server in bytes code
@override protected string doinbackground(void... params) { bytearrayoutputstream bos = new bytearrayoutputstream(); bitmapdrawable drawable = (bitmapdrawable) imageview.getdrawable(); bitmap bitmap = drawable.getbitmap(); bitmap.compress(bitmap.compressformat.jpeg, 50, bos); byte[] data = bos.tobytearray(); string filename = string.format("file_%d.png", new date().gettime()); bytearraybody bab = new bytearraybody(data, filename); httpclient client = new defaulthttpclient(); httppost post = new httppost("http://192.168.1.100/paqqy/user/registration/platform/android"); multipartentity reqentity = new multipartentity( httpmultipartmode.browser_compatible); reqentity.addpart("file", bab);
whats funny damned android studio keeps giving me noclassdeffound error @ line of bytearraybody bab = new bytearraybody(data, filename);
did try everything...rebuilding,cleaning,gradle sync,download versions of httpmime,httpcore,httpcore-cache , on...but still freaking android studio give me.in eclipse easy,was using order , export in case , error had gun,but here dont know do,please me little im angry , desperate!
Comments
Post a Comment