Use this link https://stackoverflow.com/a/19293128/958850
- In eclipse select Create a android project from existing source.
- browse your zip file for android folder[this is a sample project bundeled with the library] your project should be imported with few errors
- The actual core library is missing, We should add the ZxingCore library from process 1
- right click project -> properties -> JavaBuildPath(from left pane) -> project tab -> add -> check ZxingCore - Ok.
- All the errors should have gone now. it time to make the barcode scanner app to be a library project
- right click project -> properties -> android(from left pane) -> check isLibrary -> apply -> OK.
- Now you will get errors in some switch case statements. Convert the problematic switch case statements to it..elseif
- Your library project is ready
- for those who want to run the barcode scanner as a stand alone app skip the steps 5,6,7,8