0

I created project with android/ and included core-2.3.0.jar in it's libs/. Set this project as library. Set my project include the library project. But when I finished setting and close the project property and open again, the project library change to a cross icon. Why?

If I ignore this and go to run my project, button clicked, exception: java.lang.NoClassDefFoundError: com.google.zxing.client.android.R$layout

  • You didn't build the generated source files by running the Android build. Also: don't clone our android app completely. What you are doing based on your description is prohibited. – Sean Owen Feb 08 '14 at 16:57

1 Answers1

0

Use this link https://stackoverflow.com/a/19293128/958850

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