0 Replies Latest reply on Dec 21, 2016 7:17 AM by ivoh19731683

    Unable to build android version after changing plugin version

    ivoh19731683

      I was using the phonegap-plugin-barcodescanner v. 4.0.1 like this:

       

      But now I changed this to 6.0.4 (latest) like this:

       

      The github page says that I should add

      if I use Phonegap build so I did.

       

      But now the android build keeps failing with "Oh geez. Your build failed.".

      The end of the log looks like this:

       

      :mergeDebugResources

      :processDebugManifest

      :processDebugResources

      :generateDebugSources

      :compileDebugJavaWithJavacNote: Some input files use or override a deprecated API.

      Note: Recompile with -Xlint:deprecation for details.

      Note: Some input files use unchecked or unsafe operations.

      Note: Recompile with -Xlint:unchecked for details.

       

      :compileDebugNdk UP-TO-DATE

      :compileDebugSources

      :transformClassesWithDexForDebug

      UNEXPECTED TOP-LEVEL EXCEPTION:

      com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServ iceInfoVersionImpl;

      at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:591)

      at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:546)

      at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:528)

      at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:164)

      at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)

      at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)

      at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)

      at com.android.dx.command.dexer.Main.run(Main.java:277)

      at com.android.dx.command.dexer.Main.main(Main.java:245)

      at com.android.dx.command.Main.main(Main.java:106)

       

      FAILED

       

      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: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-1.b15.25.amzn1.x86_64/bin/java'' finished with non-zero exit value 2

       

      * 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: 50.769 secs

      undefined

      I tried removing the app and creating it again but got to the same place.

      Anyone has an idea what is happening?