EddyVerbruggen / cordova-plugin-googleplus

:heavy_plus_sign: Cordova plugin to login with Google Sign-In on iOS and Android
566 stars 625 forks source link

Multiple dex issue #370

Open knsudharsan2003 opened 7 years ago

knsudharsan2003 commented 7 years ago

Error Log on cordova build android

:preDexDebug
:dexDebug

UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/annotat
ion/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:45
4)
        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)

:dexDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
        F:\Android\android-sdk\build-tools\22.0.1\dx.bat --dex --no-optimize --o
utput F:\Cordova-Workspace\<>\platforms\android\build\interme
diates\dex\debug --input-list=F:\Cordova-Workspace\<>\platfor
ms\android\build\intermediates\tmp\dex\debug\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.ja
va: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)

* 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: 2 mins 47.76 secs

F:\Cordova-Workspace\<>\platforms\android\cordova\node_module
s\q\q.js:126
                    throw e;
                          ^
Error code 1 for command: cmd with args: /s /c "F:\Cordova-Workspace\<>\platforms\android\gradlew cdvBuildDebug -b F:\Cordova-Workspace\<>\platforms\android\build.gradle -Dorg.gradle.daemon=true"
ERROR building one of the platforms: Error: cmd: Command failed with exit code 1

You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 1

Dependency from gradle file

dependencies { compile fileTree(dir: 'libs', include: '*.jar') // SUB-PROJECT DEPENDENCIES START debugCompile project(path: "CordovaLib", configuration: "debug") releaseCompile project(path: "CordovaLib", configuration: "release") debugCompile project(path: "com.phonegap.plugins.facebookconnect:FacebookLib", configuration: "debug") releaseCompile project(path: "com.phonegap.plugins.facebookconnect:FacebookLib", configuration: "release") compile "com.google.android.gms:play-services-auth:+" compile "com.google.android.gms:play-services-identity:+" // SUB-PROJECT DEPENDENCIES END }

Plugin used in project


card.io.cordova.mobilesdk 2.1.0 "CardIO"
cc.fovea.cordova.purchase 6.0.0 "Purchase"
com.ionic.keyboard 1.0.4 "Keyboard"
com.megster.cordova.FileChooser 0.0.0 "File Chooser"
com.paypal.cordova.mobilesdk 3.3.1 "PayPalMobile"
com.phonegap.plugins.facebookconnect 0.11.0 "Facebook Connect"
com.phonegap.plugins.PushPlugin 2.5.0 "PushPlugin"
com.red_folder.phonegap.plugin.backgroundservice 3.3 "Background Services"
cordova-plugin-appversion 1.0.0 "App Version"
cordova-plugin-console 1.0.1 "Console"
cordova-plugin-dbcopy 1.0.4 "sqlDB"
cordova-plugin-device 1.0.1 "Device"
cordova-plugin-dialogs 1.1.1 "Notification"
cordova-plugin-file 3.0.0 "File"
cordova-plugin-filepath 1.0.2 "FilePath"
cordova-plugin-googleplayservices 19.0.3 "Google Play Services for Android"
cordova-plugin-googleplus 5.1.1 "Google SignIn"
cordova-plugin-http 1.1.0 "SSL Pinning"
cordova-plugin-inappbrowser 1.3.1-dev "InAppBrowser"
cordova-plugin-media-capture 1.0.1 "Capture"
cordova-plugin-networkinterface 1.0.8 "NetworkInterface"
cordova-plugin-whitelist 1.0.0 "Whitelist"
cordova-plugin-x-socialsharing 5.1.0 "SocialSharing"
cordova-plugin-x-toast 2.4.2 "Toast"
cordova-sqlite-storage 1.4.1 "Cordova sqlite storage plugin"
de.appplant.cordova.common.registerusernotificationsettings 1.0.1 "RegisterUserN
otificationSettings"
de.appplant.cordova.plugin.local-notification 0.8.2 "LocalNotification"
in.edelworks.sharedpreferences 0.1.0 "Shared Preferences"
nl.x-services.plugins.insomnia 4.0.1 "Insomnia (prevent screen sleep)"
org.apache.cordova.camera 0.3.6 "Camera"
org.apache.cordova.geolocation 0.3.12 "Geolocation"
org.transistorsoft.cordova.background-geolocation 0.3.7 "CDVBackgroundGeoLocatio
n"

I have tried removing playservice plugin, updating android sdk and even checked libs folder and inputList.txt for duplicate entries and nothing seems to be working.

hereiam133 commented 7 years ago

getting the same errors