{"id":3409,"date":"2014-03-24T17:24:24","date_gmt":"2014-03-24T17:24:24","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/24\/problem-about-apache-commons-codec-collection-of-common-programming-errors\/"},"modified":"2014-03-24T17:24:24","modified_gmt":"2014-03-24T17:24:24","slug":"problem-about-apache-commons-codec-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/24\/problem-about-apache-commons-codec-collection-of-common-programming-errors\/","title":{"rendered":"problem about apache-commons-codec-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/14588fe2df29ce7000e467f738ad16fa?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nzarthross<br \/>\nandroid eclipse base64 apache-commons-codec<br \/>\nI added the commons codec from apache.org (commons-codec-1.4.jar) in eclipse for my Android application following the instruction here. There is no error in the code. But when I run the application and call the function that use the codec the application stop and need a fore close. In the logCat says:Android Runtime: java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.encodeBase64Stringthe codeline is: String tmpStr = Base64.encodeBase64String(msg); \/\/msg is a byte[]The applicat<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/99108829176dfbbc5d0bf3c041542a26?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nPablo Fernandez<br \/>\nandroid base64 apache-commons-codec<br \/>\nToday I tried including the apache.commons.codec package in my Android application and couldn&#8217;t get it running. Android could not find method ord.apache.commons.codec.binary.* and output the following errors in DDMS01-12 08:41:48.161: ERROR\/dalvikvm(457): Could not find method org.apache.commons.codec.binary.Base64.encodeBase64URLSafeString, referenced from method com.dqminh.app.util.Util.sendRequest01-12 08:41:48.161: WARN\/dalvikvm(457): VFY: unable to resolve static method 10146: Lorg\/apache\/c<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/2b7216361772f42fefdb90cbc8bd7855?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nBinyamin Sharet<br \/>\njava base64 encode apache-commons-codec<br \/>\nIn the code below, imageInByte is a byte array. I&#8217;m receiving the following error:encodeBase64() is undefined for class rsa1import org.apache.commons.codec.binary.Base64;public class rsa1 { public static void main(String args[]) {byte[] bigByteArray=new byte[1796];for (int i=0;i&lt;4;i++)bigByteArray[i]=imageInByte[i];for (int i=4;i&lt;=1795;i++)bigByteArray[i]=cipherData[i-4];byte[] bigByteArray1 = Base64.encodeBase64(bigByteArray);}<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>zarthross android eclipse base64 apache-commons-codec I added the commons codec from apache.org (commons-codec-1.4.jar) in eclipse for my Android application following the instruction here. There is no error in the code. But when I run the application and call the function that use the codec the application stop and need a fore close. In the logCat [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3409","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3409"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3409\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}