wildabeast / BarcodeScanner

Official repository now at [phonegap/phonegap-plugin-barcodescanner](http://github.com/phonegap/phonegap-plugin-barcodescanner).
968 stars 746 forks source link

cordova build fail <eclipse/android project> #330

Open kimjangsu opened 8 years ago

kimjangsu commented 8 years ago

Hi

I have some problem in use this plugin

My Develop Environment is Windows 64bit

  1. JDK 1.8.
  2. Eclipse Mars
  3. Node.js 4.45 -Node_modules cordova plugman

I tried case

  1. "cordova create test com.example.test Test"
  2. "cordova platform add android --save"
  3. test Workspace open in the Eclipse
  4. add a code to /assets/www/index.html `var scanner = cordova.require("cordova/plugin/BarcodeScanner");

    scanner.scan( function (result) { alert("We got a barcode\n" + "Result: " + result.text + "\n" + "Format: " + result.format + "\n" + "Cancelled: " + result.cancelled); }, function (error) { alert("Scanning failed: " + error); } );` -> "/assets/www/index.html

  5. WorkSpace/src/com.phonegap.plugins.barcodescanner Package error
  6. "The import com.google cannot be resolved" in a BarcodeSvanner.java

    I Attach Screent Capture in my Evernote

BrunoEngComp commented 7 years ago

I have a same issue. This error is because the com.google.zxing.client.android.captureactivity.jar is not referenced.

But, loading the .jar in my lib folder and referenced in my project, the problem continues . I looked of the .jar lib was missing in class Scan() the atributes CAMERA_ID,ORIENTATION_LOCK, that cause other error.

V3.0.0 plugin barcodeScan.