Software Archive
Read-only legacy content
17061 Discussions

Cannot build project after upgrading to 3522 from 2893

Armando_B_
Beginner
168 Views

Hello, i've been asigned to a project that we need to mantain, this project was built with XDK 2893 I believe, but now that we need to make changes to it we need to rebuild it (we had to update from 2893 to 3522 since we coulnd't use the previous version to build projects anymore).

There's been many updates to the plugins and the XDK in general, so we upgraded both, the plugins and XDK to the latest versions, the problem is that when we try to build, it fails.

The last part of the log file says this:

UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes;
	at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
	at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
	at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
	at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
	at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
	at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
	at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
	at com.android.dx.command.dexer.Main.run(Main.java:246)
	at com.android.dx.command.dexer.Main.main(Main.java:215)
	at com.android.dx.command.Main.main(Main.java:106)


 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transformClassesWithDexForArmv7Release'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/jdk1.8.0_65/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: 1 mins 20.095 secs
Error: Error code 1 for command: .../cordova_project/platforms/android/gradlew with args: cdvBuildRelease,-b,.../cordova_project/platforms/android/build.gradle,--no-daemon,-Pandroid.useDeprecatedNdk=true

Not sure if you guys know why im getting this error, any help would be greatly appreciated, if you need any extra info, please let me know.

 

0 Kudos
1 Reply
PaulF_IntelCorp
Employee
168 Views

Armando -- you've got quite a long list of plugins, several that are not part of the core Cordova set. Also, most of those non-core plugins are using the older "dot" notation for the plugin IDs, which usually means they are older plugins (not always, but usually). My suspicion is one of those plugins is causing your build to fail. To diagnose which one is causing the problem:

  1. remove one of your "non-core" Cordova plugins
  2. build your app
  3. if the build still fails, go back to step #1
  4. otherwise, you've identified the problem plugin

Once you've identified the problem plugin you can check that plugin repo for issues or see if there is an alternative or an update that you could use.

0 Kudos
Reply