I have been keeping on getting this error in ionic all of a sudden
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/zxing/aztec/AztecDetectorResult.class
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[ERROR] An error occurred while running cordova emulate android (exit code 1).
This error goes away after I uninstall phonegap-plugin-barcodescanner. However, after reinstalling phonegap-plugin-barcodescanner, the error arises again. (Note: I have been using barcode scanner for a couple of months now and it never caused any issues until now). Any help would be greatly appreciated!
I tried the same procedure here but I did not succeed.
I’ll share my log here.
* What went wrong:
Execution failed for task ':transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException:
java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define
Lcom/google/zxing/BarcodeFormat;
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 9.397 secs
Error: /Users/leandrogoncalves/Projetos/ionic3/testQrCode/platforms/android/gradlew: Command failed with exit
code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException:
java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define
Lcom/google/zxing/BarcodeFormat;
* Try: