Solved
prerequisties download latest zxing package.
Process 1
- create a java project in eclipse.and name it to something like ZxingCore.
- copy and paste complete src folder inside core folder.
- In case you need to edit any code, you can do it. otherwise skip this
step.
- Java library is ready to be used.
[Note: Compile Java project using Java 1.6 to get rid of run time exceptions]
Process 2
- 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
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…