Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Importing org.apache.commons into android applications

Hay, how do i import org.apache.commons packages into android so i can use them in my applications?

Thanks

like image 219
dotty Avatar asked Jan 27 '10 12:01

dotty


3 Answers

If you're using eclipse:

  1. Download jar packages for libraries you are interested in
  2. Go to project properties in eclipse -> Java Build Path -> Libraries. Add External JARs here.
like image 158
Nikola Smiljanić Avatar answered Nov 16 '22 08:11

Nikola Smiljanić


Just for completeness' sake - if you aren't using eclipse to develop and you are building with ant - just put the jar in your libs folder of your project.
Done!

like image 25
MattK Avatar answered Nov 16 '22 07:11

MattK


Also, be warned that not all of them can be automatically converted to Dalvik. For example commons-httpclient does not convert cleanly from the release binaries, you need to go through source to make it work.

like image 3
Zds Avatar answered Nov 16 '22 06:11

Zds