HI my build is failing all of a sudden (worked fine two days ago) and seems to be down to my Facebook plugin.

  • 1
  • Problem
  • Updated 4 years ago
HI, I have the facebook plugin for phonegap build and trying to run phonegap last night, the build failed, removing the facebook plugin let it work but I need the plugin for the app.  Does anyone have any ideas please?
Photo of Mike Cadden

Mike Cadden

  • 3 Posts
  • 0 Reply Likes

Posted 4 years ago

  • 1
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
What plugin? What version of the plugin?
What PGB version?
What does your build log say?
Photo of Mike Cadden

Mike Cadden

  • 3 Posts
  • 0 Reply Likes
Plugin is com.phonegap.plugins.facebookconnect, version 090

phone gap version is cli-5.2.0 (3.9.1 / 4.1.1 / 3.8.1)

And the log says; 

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':dexRelease'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
  	/android-sdk/build-tools/23.0.1/dx --dex --output /project/build/intermediates/dex/release --input-list=/project/build/intermediates/tmp/dex/release/inputList.txt
  Error Code:
  	2
  Output:
  	
  	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:502)
  		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)
  	


* 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 8.376 secs

/project/cordova/node_modules/q/q.js:126
                    throw e;
                    ^
Error code 1 for command: /project/gradlew with args: cdvBuildRelease,-b,/project/build.gradle,-Dorg.gradle.daemon=true,-PcdvBuildMultipleApks=false
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Photo of Mike Cadden

Mike Cadden

  • 3 Posts
  • 0 Reply Likes
Hi Petra, that worked.  thank you very much.

M