Tipsi-stripe: ERROR: Failed to resolve: com.google.android.gms:play-services-wallet:16.1.0

Created on 12 Jul 2019  路  3Comments  路  Source: tipsi/tipsi-stripe

Before I have submitted the issue

[x] I have read an installation guide
[x] I know that for an iOS I need to install pods because I've read the installation guide
[x] I have read a linking guide and checked that everything is OK like in manual linking guide
[x] I know that before using tipsi-stripe I need to set options for my app as described in usage guide

The problem

ERROR: Failed to resolve: com.google.android.gms:play-services-wallet:16.1.0 even though getting exluded and specifying an implementation of 16.0.0

Environment

  • tipsi-stripe version: 7.5.0
  • Last tipsi-stripe version where the issue was not reproduced (if applicable):
  • iOS or Android: Android
  • OS version: 8.1
  • React-Native version: 0.59.8
  • (Android only) com.google.firebase:firebase-core version: 16.0.8
  • (Android only) com.google.android.gms:play-services-base version: 16.1.0

Links to logs and sources

https://gist.github.com/guerandelv/6f07b7221e6d264432dfeb704ec5545b

Code To Reproduce Issue (Good To Have)

A sync project with gradle files

wont-fix

Most helpful comment

Had the same problem. Solution was to remove the global playServicesVersion from root level build.gradle. I think the lib tries to get the wallet version from the global play you have defined at some point.

Root level build.gradle

ext {
    compileSdkVersion = 28
    buildToolsVersion = "28.0.3"
    minSdkVersion = 19
    targetSdkVersion = 28
    supportLibVersion = "28.0.0"
    googlePlayServicesVersion = "16.1.0"  <-- removed this line
}

If you are using react-native-maps then change the app level build.gradle according to https://github.com/react-native-community/react-native-maps/blob/master/docs/installation.md#build-configuration-on-android

implementation(project(':react-native-maps')){
       exclude group: 'com.google.android.gms', module: 'play-services-base'
       exclude group: 'com.google.android.gms', module: 'play-services-maps'
}
implementation 'com.google.android.gms:play-services-base:10.0.1'
implementation 'com.google.android.gms:play-services-maps:10.0.1'

If its still not working you can try to add/edit the following as well in the same file:

implementation (project(':tipsi-stripe')) {
     exclude group: 'com.google.android.gms', module: 'play-services-base'
     exclude group: 'com.google.android.gms', module: 'play-services-wallet'
}
implementation 'com.google.android.gms:play-services-wallet:16.0.1' // or some preferred version

All 3 comments

@guerandelv same issue here , did you solve it?

Had the same problem. Solution was to remove the global playServicesVersion from root level build.gradle. I think the lib tries to get the wallet version from the global play you have defined at some point.

Root level build.gradle

ext {
    compileSdkVersion = 28
    buildToolsVersion = "28.0.3"
    minSdkVersion = 19
    targetSdkVersion = 28
    supportLibVersion = "28.0.0"
    googlePlayServicesVersion = "16.1.0"  <-- removed this line
}

If you are using react-native-maps then change the app level build.gradle according to https://github.com/react-native-community/react-native-maps/blob/master/docs/installation.md#build-configuration-on-android

implementation(project(':react-native-maps')){
       exclude group: 'com.google.android.gms', module: 'play-services-base'
       exclude group: 'com.google.android.gms', module: 'play-services-maps'
}
implementation 'com.google.android.gms:play-services-base:10.0.1'
implementation 'com.google.android.gms:play-services-maps:10.0.1'

If its still not working you can try to add/edit the following as well in the same file:

implementation (project(':tipsi-stripe')) {
     exclude group: 'com.google.android.gms', module: 'play-services-base'
     exclude group: 'com.google.android.gms', module: 'play-services-wallet'
}
implementation 'com.google.android.gms:play-services-wallet:16.0.1' // or some preferred version

Yeah unfortunately looking at the list of versions available for play-services-maps and play-services-wallet the only recent versions they have in common are 16.0.0 or 17.0.0 so if you're on react-native 0.60+ OR you've manually updated your android app to use AndroidX + Jetifier you might be able to fix this by updating googlePlayServicesVersion to be "17.0.0".

Otherwise the rest of us need to use the exclude approach to fine tune the google play services versions and not use a global googlePlayServicesVersion.

Was this page helpful?
0 / 5 - 0 ratings