Cannot resolve google play services version 15.0.2

Psyycker

When I want to install Google play services 15.0.2 (because 15.0.0 create a dexing error I don't know why) I have these errors from gradle :

Failed to resolve: com.google.android.gms:play-services-location:15.0.2
Install Repository and sync project
Open File
Show in Project Structure dialog


Failed to resolve: com.google.android.gms:play-services-basement:15.0.2
Install Repository and sync project
Open File
Show in Project Structure dialog


Failed to resolve: com.google.android.gms:play-services-tasks:15.0.2
Install Repository and sync project
Open File
Show in Project Structure dialog

But I've never put these dependencies in any build.gradle. If I want to install with the install button, I have the error : Could not find dependency

This is my build.gradle file :

apply plugin: 'com.android.library'

def DEFAULT_COMPILE_SDK_VERSION             = 25
def DEFAULT_BUILD_TOOLS_VERSION             = "25.0.2"
def DEFAULT_TARGET_SDK_VERSION              = 25
def DEFAULT_GOOGLE_PLAY_SERVICES_VERSION    = "15.0.2"

android {
compileSdkVersion project.hasProperty('compileSdkVersion') ? 
project.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
buildToolsVersion project.hasProperty('buildToolsVersion') ? 
project.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION

defaultConfig {
    minSdkVersion 16
    targetSdkVersion 
project.hasProperty('buildToolsVetargetSdkVersionrsion') ? 
project.buildToolsVersion : DEFAULT_TARGET_SDK_VERSION
    versionCode 1
    versionName "1.0"
}
}

repositories {
mavenCentral()
}

dependencies {
    def googlePlayServicesVersion = 
project.hasProperty('googlePlayServicesVersion') ? 
project.googlePlayServicesVersion : DEFAULT_GOOGLE_PLAY_SERVICES_VERSION

    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.facebook.react:react-native:+'
    compile "com.google.firebase:firebase-core:$googlePlayServicesVersion"
    compile "com.google.firebase:firebase-messaging:$googlePlayServicesVersion"
    compile 'me.leolin:ShortcutBadger:1.1.17@aar'
}

EDIT : I succeeded to solve my problem. Actually, I had a multidex script in my parent build.gradle which force updated all my com.gms.google to 15.0.2 but as you said, google play services don't have 15.0.2. I just removed this script and it worked

Levi Moreira

Firebase libraries now have independent versions, as opposed to the same version they shared before. See here. So this is working for now, but it might be different in the future:

implementation "com.google.firebase:firebase-core:$googlePlayServicesVersion"
implementation "com.google.firebase:firebase-messaging:$googlePlayServicesVersion"

And more importantly, firebase libs no longer have the same version as the google play services ones, there is no version 15.0.2 for play services libraries such as location, see here, the latest is 15.0.0.

My advice is to define each library individually.

To fix you problem change this :

def DEFAULT_GOOGLE_PLAY_SERVICES_VERSION    = "15.0.0"

and this:

implementation "com.google.firebase:firebase-core:15.0.2"
implementation "com.google.firebase:firebase-messaging:15.0.2"

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Google Play Services Version for Android Studio

分類Dev

Google Play Services version 5.2.08 too recent for my device

分類Dev

Error after upgrade Google Play Services to 11.0.0 version

分類Dev

Fake/mock Google Play Services

分類Dev

Error in using Google Play Services

分類Dev

How do I know what the latest version of Google Play Services is for Android Studio?

分類Dev

Google Play Game Services VS Google Drive

分類Dev

エラー:リソースinteger / google_play_services_version(別名app:integer / google_play_services_version)が見つかりません

分類Dev

intellijのシンボル@ integer / google_play_services_versionを解決できません

分類Dev

Android:LocationManagerとGoogle Play Services

分類Dev

Google Play Services Library Error onesignal

分類Dev

Retrieve leaderboard position in Google play game services

分類Dev

How to remove Google Play Services from GenyMotion?

分類Dev

How does NodeAPI in Google Play Services work?

分類Dev

How to specify google play services dependency in maven

分類Dev

Android google services plugin version conflict

分類Dev

How set the correct version of play-services in Ionic Pro

分類Dev

Android Development - Google Play Services, Google Login Integration

分類Dev

Google Play Services - Google login yields a network error

分類Dev

Striping down google play services only to google drive related methods

分類Dev

How to require updated play services and add "This app won't run unless you update Google Play services"

分類Dev

This version of the application is not configured for billing through Google Play

分類Dev

Reset version number on the google play store

分類Dev

aarライブラリのgoogle_play_services_version値にエラーがあります

分類Dev

Android Studio 2.2 Google Play Services同期エラー

分類Dev

Open source replacement for Google Play location services on Android

分類Dev

Google Play services out of date. Requires 7571000 but found 6774470

分類Dev

After upgrading to google play services 8.4.0 my app crashes on startup

分類Dev

Google Play services Task API: continueWith vs continueWithTask

Related 関連記事

  1. 1

    Google Play Services Version for Android Studio

  2. 2

    Google Play Services version 5.2.08 too recent for my device

  3. 3

    Error after upgrade Google Play Services to 11.0.0 version

  4. 4

    Fake/mock Google Play Services

  5. 5

    Error in using Google Play Services

  6. 6

    How do I know what the latest version of Google Play Services is for Android Studio?

  7. 7

    Google Play Game Services VS Google Drive

  8. 8

    エラー:リソースinteger / google_play_services_version(別名app:integer / google_play_services_version)が見つかりません

  9. 9

    intellijのシンボル@ integer / google_play_services_versionを解決できません

  10. 10

    Android:LocationManagerとGoogle Play Services

  11. 11

    Google Play Services Library Error onesignal

  12. 12

    Retrieve leaderboard position in Google play game services

  13. 13

    How to remove Google Play Services from GenyMotion?

  14. 14

    How does NodeAPI in Google Play Services work?

  15. 15

    How to specify google play services dependency in maven

  16. 16

    Android google services plugin version conflict

  17. 17

    How set the correct version of play-services in Ionic Pro

  18. 18

    Android Development - Google Play Services, Google Login Integration

  19. 19

    Google Play Services - Google login yields a network error

  20. 20

    Striping down google play services only to google drive related methods

  21. 21

    How to require updated play services and add "This app won't run unless you update Google Play services"

  22. 22

    This version of the application is not configured for billing through Google Play

  23. 23

    Reset version number on the google play store

  24. 24

    aarライブラリのgoogle_play_services_version値にエラーがあります

  25. 25

    Android Studio 2.2 Google Play Services同期エラー

  26. 26

    Open source replacement for Google Play location services on Android

  27. 27

    Google Play services out of date. Requires 7571000 but found 6774470

  28. 28

    After upgrading to google play services 8.4.0 my app crashes on startup

  29. 29

    Google Play services Task API: continueWith vs continueWithTask

ホットタグ

アーカイブ