EddyVerbruggen / cordova-plugin-googleplus

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

BUILD FAILED Error: more than one library with package name 'com.google.android.gms.license' #473

Open Xdabier opened 6 years ago

Xdabier commented 6 years ago

I tried to add the plugin to my app following the documentation's steps , however I got that error in the title, ionic cordova run andoid output = `ANDROID_HOME=/home/xdabier/Android/Sdk JAVA_HOME=/usr/lib/jvm/java-8-oracle Subproject Path: CordovaLib The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.

at build_3i3yczahvfbrgvj7tt6v8t6ah.run(/home/xdabier/workandshit/Range_Brainxstudio/Range/platforms/android/build.gradle:143)

The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0. Incremental java compilation is an incubating feature. The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead. :preBuild

UP-TO-DATE :preDebugBuild UP-TO-DATE :checkDebugManifest

:preReleaseBuild

UP-TO-DATE

:CordovaLib:preBuild UP-TO-DATE :CordovaLib:preDebugBuild UP-TO-DATE :CordovaLib:checkDebugManifest :CordovaLib:prepareDebugDependencies :CordovaLib:compileDebugAidl UP-TO-DATE :CordovaLib:compileDebugNdk UP-TO-DATE :CordovaLib:compileLint

UP-TO-DATE

:CordovaLib:copyDebugLint UP-TO-DATE :CordovaLib:mergeDebugShaders UP-TO-DATE :CordovaLib:compileDebugShaders UP-TO-DATE :CordovaLib:generateDebugAssets UP-TO-DATE :CordovaLib:mergeDebugAssets

UP-TO-DATE

:CordovaLib:mergeDebugProguardFiles

UP-TO-DATE

:CordovaLib:packageDebugRenderscript

UP-TO-DATE

:CordovaLib:compileDebugRenderscript UP-TO-DATE :CordovaLib:generateDebugResValues UP-TO-DATE :CordovaLib:generateDebugResources

UP-TO-DATE :CordovaLib:packageDebugResources UP-TO-DATE :CordovaLib:processDebugManifest UP-TO-DATE

:CordovaLib:generateDebugBuildConfig UP-TO-DATE :CordovaLib:processDebugResources UP-TO-DATE

:CordovaLib:generateDebugSources UP-TO-DATE :CordovaLib:incrementalDebugJavaCompilationSafeguard UP-TO-DATE

:CordovaLib:compileDebugJavaWithJavac UP-TO-DATE :CordovaLib:processDebugJavaRes UP-TO-DATE :CordovaLib:transformResourcesWithMergeJavaResForDebug UP-TO-DATE :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug UP-TO-DATE :CordovaLib:mergeDebugJniLibFolders UP-TO-DATE :CordovaLib:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE :CordovaLib:transformNative_libsWithSyncJniLibsForDebug UP-TO-DATE :CordovaLib:bundleDebug UP-TO-DATE :CordovaLib:preReleaseBuild UP-TO-DATE :CordovaLib:checkReleaseManifest :CordovaLib:prepareReleaseDependencies :CordovaLib:compileReleaseAidl UP-TO-DATE :CordovaLib:compileReleaseNdk UP-TO-DATE :CordovaLib:copyReleaseLint UP-TO-DATE :CordovaLib:mergeReleaseShaders UP-TO-DATE :CordovaLib:compileReleaseShaders UP-TO-DATE :CordovaLib:generateReleaseAssets UP-TO-DATE :CordovaLib:mergeReleaseAssets UP-TO-DATE :CordovaLib:mergeReleaseProguardFiles UP-TO-DATE :CordovaLib:packageReleaseRenderscript UP-TO-DATE :CordovaLib:compileReleaseRenderscript UP-TO-DATE :CordovaLib:generateReleaseResValues UP-TO-DATE :CordovaLib:generateReleaseResources UP-TO-DATE :CordovaLib:packageReleaseResources UP-TO-DATE :CordovaLib:processReleaseManifest

UP-TO-DATE

:CordovaLib:generateReleaseBuildConfig

UP-TO-DATE

:CordovaLib:processReleaseResources

UP-TO-DATE

:CordovaLib:generateReleaseSources UP-TO-DATE :CordovaLib:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE

:CordovaLib:compileReleaseJavaWithJavac UP-TO-DATE :CordovaLib:processReleaseJavaRes UP-TO-DATE :CordovaLib:transformResourcesWithMergeJavaResForRelease UP-TO-DATE :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease

UP-TO-DATE :CordovaLib:mergeReleaseJniLibFolders UP-TO-DATE :CordovaLib:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE :CordovaLib:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE :CordovaLib:bundleRelease

UP-TO-DATE

:prepareAndroidArchLifecycleRuntime103Library UP-TO-DATE :prepareComAndroidSupportAnimatedVectorDrawable2702Library UP-TO-DATE :prepareComAndroidSupportAppcompatV72702Library UP-TO-DATE :prepareComAndroidSupportCardviewV72702Library UP-TO-DATE :prepareComAndroidSupportCustomtabs2702Library UP-TO-DATE :prepareComAndroidSupportSupportCompat2702Library UP-TO-DATE :prepareComAndroidSupportSupportCoreUi2702Library UP-TO-DATE :prepareComAndroidSupportSupportCoreUtils2702Library UP-TO-DATE :prepareComAndroidSupportSupportFragment2702Library UP-TO-DATE :prepareComAndroidSupportSupportVectorDrawable2702Library UP-TO-DATE :prepareComFacebookAndroidFacebookAndroidSdk4310Library UP-TO-DATE :prepareComFacebookAndroidFacebookApplinks4310Library UP-TO-DATE :prepareComFacebookAndroidFacebookCommon4310Library UP-TO-DATE :prepareComFacebookAndroidFacebookCore4310Library UP-TO-DATE :prepareComFacebookAndroidFacebookLogin4310Library UP-TO-DATE :prepareComFacebookAndroidFacebookMessenger4310Library UP-TO-DATE :prepareComFacebookAndroidFacebookPlaces4310Library UP-TO-DATE :prepareComFacebookAndroidFacebookShare4310Library UP-TO-DATE :prepareComGoogleAndroidGmsPlayServicesAuth1200Library UP-TO-DATE :prepareComGoogleAndroidGmsPlayServicesAuthApiPhone1200Library UP-TO-DATE :prepareComGoogleAndroidGmsPlayServicesAuthApiPhoneLicense1200Library UP-TO-DATE :prepareComGoogleAndroidGmsPlayServicesAuthBase1200Library UP-TO-DATE :prepareComGoogleAndroidGmsPlayServicesAuthBaseLicense1200Library UP-TO-DATE :prepareComGoogleAndroidGmsPlayServicesBase1200Library UP-TO-DATE :prepareComGoogleAndroidGmsPlayServicesBaseLicense1200Library UP-TO-DATE :prepareComGoogleAndroidGmsPlayServicesBasement1200Library UP-TO-DATE :prepareComGoogleAndroidGmsPlayServicesBasementLicense1200Library UP-TO-DATE :prepareComGoogleAndroidGmsPlayServicesTasks1200Library UP-TO-DATE :prepareComGoogleAndroidGmsPlayServicesTasksLicense1200Library UP-TO-DATE :prepareOrgApacheCordovaCordovaLib630DebugLibrary UP-TO-DATE :prepareDebugDependencies :compileDebugAidl :compileDebugRenderscript

UP-TO-DATE :generateDebugBuildConfig

:generateDebugResValues UP-TO-DATE :processDebugGoogleServices

:generateDebugResources :mergeDebugResources [09:13:08] tslint: src/providers/users-personal/users-personal.ts, line: 3 'firebase' is declared but its value is never read.

   L2:  import {Injectable} from '@angular/core';
   L3:  import * as firebase from "firebase";
   L4:  import {AngularFireDatabase} from "angularfire2/database";

[09:13:08] tslint: src/pages/category-tags-check/category-tags-check.ts, line: 2 'ViewController' is declared but its value is never read.

   L1:  import {Component} from '@angular/core';
   L2:  import {NavController, NavParams, ViewController} from 'ionic-angular';
   L3:  import {CategoriesProvider} from "../../providers/categories/categories";

[09:13:08] tslint: src/pages/landing/landing.ts, line: 3 All imports are unused.

   L2:  import {NavController, NavParams, ViewController} from 'ionic-angular';
   L3:  import {TabsHomePage} from "../tabs-home/tabs-home";
   L4:  import {SignInPage} from "../sign-in/sign-in";

[09:13:08] tslint: src/components/side-menu/side-menu.ts, line: 10 'LoadingController' is declared but its value is never read.

   L9:  import {LandingPage} from "../../pages/landing/landing";
  L10:  import {App, Events, LoadingController, MenuController, ModalController, PopoverController} from "ionic-angu
  L11:  import {UsersBusinessProvider} from "../../providers/users-business/users-business";

[09:13:08] tslint: src/components/side-menu/side-menu.ts, line: 12 All imports are unused.

  L11:  import {UsersBusinessProvider} from "../../providers/users-business/users-business";
  L12:  import {AngularFireAuth} from "angularfire2/auth";
  L13:  import {AuthenticationProvider} from "../../providers/authentication/authentication";

[09:13:08] tslint: src/components/components.module.ts, line: 2 All imports are unused.

   L1:  import { NgModule } from '@angular/core';
   L2:  import { NotificationMessagesRequestsComponent } from './notification-messages-requests/notification-message
   L3:  import { NotificationNewMessagesComponent } from './notification-new-messages/notification-new-messages';

[09:13:08] tslint: src/components/components.module.ts, line: 3 All imports are unused.

   L2:  import { NotificationMessagesRequestsComponent } from './notification-messages-requests/notification-messages-requests';
   L3:  import { NotificationNewMessagesComponent } from './notification-new-messages/notification-new-messages';
   L4:  import { RangersDefaultComponent } from './rangers-default/rangers-default';

[09:13:08] tslint: src/components/components.module.ts, line: 4 All imports are unused.

   L3:  import { NotificationNewMessagesComponent } from './notification-new-messages/notification-new-messages';
   L4:  import { RangersDefaultComponent } from './rangers-default/rangers-default';
   L5:  import { RangersSearchComponent } from './rangers-search/rangers-search';

[09:13:08] tslint: src/components/components.module.ts, line: 5 All imports are unused.

   L4:  import { RangersDefaultComponent } from './rangers-default/rangers-default';
   L5:  import { RangersSearchComponent } from './rangers-search/rangers-search';
   L6:  import { StationDefaultComponent } from './station-default/station-default';

[09:13:08] tslint: src/components/components.module.ts, line: 6 All imports are unused.

   L5:  import { RangersSearchComponent } from './rangers-search/rangers-search';
   L6:  import { StationDefaultComponent } from './station-default/station-default';
   L7:  import { StationSearchComponent } from './station-search/station-search';

[09:13:08] tslint: src/components/components.module.ts, line: 7 All imports are unused.

   L6:  import { StationDefaultComponent } from './station-default/station-default';
   L7:  import { StationSearchComponent } from './station-search/station-search';
   L8:  import { StationDistanceSortComponent } from './station-distance-sort/station-distance-sort';

[09:13:08] tslint: src/components/components.module.ts, line: 8 All imports are unused.

   L7:  import { StationSearchComponent } from './station-search/station-search';
   L8:  import { StationDistanceSortComponent } from './station-distance-sort/station-distance-sort';
   L9:  import { PersonalConvDefaultComponent } from './personal-conv-default/personal-conv-default';

[09:13:08] tslint: src/components/components.module.ts, line: 9 All imports are unused.

   L8:  import { StationDistanceSortComponent } from './station-distance-sort/station-distance-sort';
   L9:  import { PersonalConvDefaultComponent } from './personal-conv-default/personal-conv-default';
  L10:  import { PersonalConvRequestComponent } from './personal-conv-request/personal-conv-request';

[09:13:08] tslint: src/components/components.module.ts, line: 10 All imports are unused.

   L9:  import { PersonalConvDefaultComponent } from './personal-conv-default/personal-conv-default';
  L10:  import { PersonalConvRequestComponent } from './personal-conv-request/personal-conv-request';
  L11:  import { SideMenuComponent } from './side-menu/side-menu';

[09:13:08] tslint: src/components/components.module.ts, line: 11 All imports are unused.

  L10:  import { PersonalConvRequestComponent } from './personal-conv-request/personal-conv-request';
  L11:  import { SideMenuComponent } from './side-menu/side-menu';
  L12:  @NgModule({/*

[09:13:08] lint finished in 7.80 s

:processDebugManifest

:processDebugResources FAILED

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 7.973 secs Error: /home/xdabier/workandshit/Range_Brainxstudio/Range/platforms/android/gradlew: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.

[ERROR] An error occurred while running cordova run android (exit code 1). `

Xdabier commented 6 years ago

$ cordova plugin list output = cordova-plugin-buildinfo 2.0.1 "BuildInfo" cordova-plugin-camera 4.0.2 "Camera" cordova-plugin-device 1.1.4 "Device" cordova-plugin-facebook4 1.9.1 "Facebook Connect" cordova-plugin-geolocation 4.0.1 "Geolocation" cordova-plugin-googleplus 5.2.1 "Google SignIn" cordova-plugin-ionic-webview 1.1.16 "cordova-plugin-ionic-webview" cordova-plugin-splashscreen 5.0.2 "Splashscreen" cordova-plugin-statusbar 2.4.1 "StatusBar" cordova-plugin-whitelist 1.3.3 "Whitelist" cordova-universal-links-plugin 1.2.1 "Universal Links Plugin" ionic-plugin-keyboard 2.2.1 "Keyboard"

lfxsantos commented 6 years ago

Same issue here. Yesterday google play services was upgraded.

Xdabier commented 6 years ago

is there anyway to fix that ?

johnsonbeng commented 6 years ago

For me the only way to fix this is changing build.gradle file as mentioned here

xProgrammer-007 commented 6 years ago

@johnsonbeng solution removed the error but in android 6.3.0 app crashes , it stops the moment it starts in the device .

Some additional info . In your file project.properties , if you find cordova.system.library.2=com.google.gms:google-services:+ This is bad move , you want to comment it out and try specific version listed https://developers.google.com/android/guides/setup and for firebase https://firebase.google.com/docs/android/setup

xProgrammer-007 commented 6 years ago

Ok so the solution is follow this in your build.gradle file compare and make changes compile "com.android.support:support-v4:26.0.0+" compile "com.google.gms:google-services:+" force compile "com.google.android.gms:play-services-tagmanager:11.+" force compile "com.google.firebase:firebase-core:11.+" force compile "com.google.firebase:firebase-messaging:11.+" force compile "com.google.firebase:firebase-crash:11.+" force compile "com.google.firebase:firebase-config:11.+" compile "com.android.support:support-v4:26.+"

There seems to have issues with version 12.0.0 that google updated lately . Change to 11.+

in your project.properties file in platform/android folder compare and make changes

cordova.system.library.2=com.android.support:support-v4:26.0.0+ cordova.gradle.include.3=cordova-plugin-firebase/BkAssistant-build.gradle cordova.system.library.3=com.google.gms:google-services:+ cordova.system.library.4=com.google.android.gms:play-services-tagmanager:11.+ cordova.system.library.5=com.google.firebase:firebase-core:11.+ cordova.system.library.6=com.google.firebase:firebase-messaging:11.+ cordova.system.library.7=com.google.firebase:firebase-crash:11.+ cordova.system.library.8=com.google.firebase:firebase-config:11.+ cordova.system.library.9=com.android.support:support-v4:26.+

in your cordova plugin firebase folder inside platform/android make these changes

dependencies { compile 'me.leolin:ShortcutBadger:1.1.4@aar' compile 'com.google.firebase:firebase-crash:11.+' compile 'com.google.firebase:firebase-auth:11.+' } And finally make modifications in plugin.xml in cordova-plugin-firebase folder in plugins/cordova-plugin-firebase

`

    <framework src="com.google.firebase:firebase-core:11.+" />
    <framework src="com.google.firebase:firebase-messaging:11.+" />
    <framework src="com.google.firebase:firebase-crash:11.+" />
    <framework src="com.google.firebase:firebase-config:11.+" />`

This should do for now