Zxing library cannot be resolved

ImMathan picture ImMathan · Aug 8, 2014 · Viewed 7.3k times · Source

I am developing app with zxing library. I imported the zxing project into my work place. When i importing there were some problems i faced.

  1. Compile the project by java 1.7. I done it.
  2. CameraConfigurationUtils was missing. I copied from the library source.
  3. Resource id's cannot be used to check in the switch case. I changed it to if else.

But finally there is a broblem in the 1. emailResult.getTos() was not resolved in EmailAddressResultHandler 2. Then i built the project there comes the problem R.java cannot be resolved throughout my application.

What i am doing wrong?

Answer

VoyageWu picture VoyageWu · Aug 26, 2014

I think you used the 3.10 or older pre-built jar, but your ZXing project is from GitHub which should use 3.1.1-snapshot.jar build with maven. The APIs had been modified last month according https://github.com/zxing/zxing/commit/8158984458f6db59b462ef2b4dd270321c66f203

I just build the core-3.1.1-SNAPSHOT and test it, it works. You can get it and replace your core.jar and try it :). I put them on my GitHub. https://github.com/voyagewu/ZXing_library/tree/master/core-3.1.1-SNAPSHOT