danwilson / google-analytics-plugin

Cordova (PhoneGap) Plugin to connect to the native Google's Universal Analytics SDK 3.0
MIT License
695 stars 500 forks source link

Dependency failing: com.google.android.gms:play-services-tagmanager-v4-impl:11.0.1 #584

Closed shide1989 closed 4 years ago

shide1989 commented 4 years ago

Hi guys,

I installed the latest plugin version, and got the following issues.

Any idea where to fix this ?

Stacktrace :

In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[11.0.
1]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.

Dependency failing: com.google.android.gms:play-services-tagmanager-v4-impl:11.0.1 -> com.google.android.gms:play-servic
es-basement@[11.0.1], but play-services-basement version was 17.0.0.

The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends onto com.google.android.gms:play-services-tagmanager-v4-impl@{strictly 11.0.1}
-- Project 'app' depends onto com.google.android.gms:play-services-basement@{strictly 17.0.0}
-- Project 'app' depends onto com.google.android.gms:play-services-analytics-impl@{strictly 11.0.1}
-- Project 'app' depends onto com.google.android.gms:play-services-analytics@{strictly 11.0.1}
-- Project 'app' depends onto com.google.android.gms:play-services-analytics@11.0.1
-- Project 'app' depends onto com.google.android.gms:play-services-base@{strictly 17.0.0}
-- Project 'app' depends onto com.google.android.gms:play-services-tasks@{strictly 17.0.0}

For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
uild.gradle file.

package.json dependencies :

    "@angular/animations": "6.1.10",
    "@angular/common": "6.1.10",
    "@angular/compiler": "6.1.10",
    "@angular/compiler-cli": "6.1.10",
    "@angular/core": "6.1.10",
    "@angular/forms": "6.1.10",
    "@angular/platform-browser": "6.1.10",
    "@angular/platform-browser-dynamic": "6.1.10",
    "@capacitor-community/http": "^0.2.1",
    "@capacitor/android": "^2.4.0",
    "@capacitor/core": "^2.4.0",
    "@capacitor/ios": "^2.4.0",
    "@ionic-native/camera": "^5.27.0",
    "@ionic-native/core": "5.27.0",
    "@ionic-native/crop": "^5.27.0",
    "@ionic-native/facebook": "^5.27.0",
    "@ionic-native/fcm": "^5.27.0",
    "@ionic-native/file": "^5.27.0",
    "@ionic-native/file-transfer": "^5.27.0",
    "@ionic-native/firebase": "^5.27.0",
    "@ionic-native/globalization": "^5.27.0",
    "@ionic-native/google-analytics": "^5.27.0",
    "@ionic-native/image-picker": "^5.27.0",
    "@ionic-native/image-resizer": "^5.27.0",
    "@ionic-native/in-app-browser": "^5.27.0",
    "@ionic-native/keyboard": "^5.27.0",
    "@ionic-native/photo-library": "^5.27.0",
    "@ionic-native/splash-screen": "5.27.0",
    "@ionic-native/status-bar": "5.27.0",
    "@ionic/angular": "^5.3.1",
    "@ionic/angular-toolkit": "^2.3.0",
    "@ionic/pro": "2.0.4",
    "@ionic/storage": "2.2.0",
    "@ngx-translate/core": "^9.1.1",
    "@ngx-translate/http-loader": "^2.0.1",
    "@types/lodash": "4.14.116",
    "cordova": "^9.0.1-nightly.2019.11.10.44afc892",
    "cordova-android": "^9.0.0",
    "cordova-ios": "4.5.4",
    "cordova-plugin-camera": "^4.1.0",
    "cordova-plugin-crop": "^0.4.0",
    "cordova-plugin-device": "^2.0.3",
    "cordova-plugin-facebook4": "^6.4.0",
    "cordova-plugin-globalization": "^1.11.0",
    "cordova-plugin-google-analytics": "^1.9.0",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-whitelist": "^1.3.4",
    "cordova-support-android-plugin": "^1.0.2",
    "ion-datepicker": "^2.8.2",
    "ionic-angular": "^3.9.10",
    "ionic-plugin-keyboard": "^2.2.1",
    "ionicons": "3.0.0",
    "jetifier": "^1.6.6",
    "moment": "^2.27.0",
    "rxjs": "^6.6.2",
    "rxjs-compat": "^6.6.2",
    "sw-toolbox": "3.6.0",
    "underscore": "^1.10.2",
    "zone.js": "0.8.29"
shide1989 commented 4 years ago

Solved it by adding googleServices.disableVersionCheck = true at the end of my build.gradle project file.

Reference : https://github.com/google/play-services-plugins/issues/36#issuecomment-553576565

maxkopych commented 4 years ago

googleServices.disableVersionCheck = true

where exactly did you enter this line? added to /platforms/android/build.gradle but getting error

A problem occurred evaluating root project 'android'. Could not get unknown property 'googleServices' for root project 'android' of type org.gradle.api.Project.