-2

I have updated my app to compileSdkVersion 27, I also updated gradle plugin to 3.0.1' and all play-services libraries to version 15.0.0

Now when i build the app, it gives me following error message.

Failed to resolve: play-services-basement

I am using force 'com.google.android.gms:play-services-basement:15.0.0', I am unable to understand why its giving me this error message.

These are my gradle settings.

    compileSdkVersion 27
    buildToolsVersion "27.0.1"

   defaultConfig {

        applicationId ''
        minSdkVersion 21
        targetSdkVersion 27
        versionCode 285
        multiDexEnabled true
        resConfigs "en"

    }

    resolutionStrategy {

        force 'com.squareup.okhttp:okhttp:2.4.0'
        force 'com.squareup.okhttp:okhttp-urlconnection:2.4.0'
        force 'com.android.support:support-v4:24.1.1'
        force 'com.android.support:cardview-v7:24.1.1'
        force 'com.android.support:appcompat-v7:24.1.1'
        force 'com.android.support:design:24.1.1'
        force 'com.google.android.gms:play-services-ads:15.0.0'
        force 'com.google.android.gms:play-services-location:15.0.0'
        force 'com.google.android.gms:play-services-auth-base:15.0.1'
        force 'com.google.android.gms:play-services-base:15.0.0'
        force 'com.google.android.gms:play-services-maps:15.0.0'
        force 'com.google.android.gms:play-services-identity:15.0.0'
        force 'com.google.android.gms:play-services-wallet:15.0.0'
        force 'com.google.android.gms:play-services-tasks:15.0.0'
        force 'com.google.android.gms:play-services-basement:15.0.0'
        force 'com.google.firebase:firebase-common:15.0.0'
        force 'com.google.android.gms:play-services-base:15.0.0'
    }


    dependencies {

    implementation 'com.android.support:cardview-v7:27.1.1'

    implementation 'com.google.android.gms:play-services-maps:15.0.0'
    implementation 'com.google.android.gms:play-services-analytics:15.0.0'
    implementation 'com.google.android.gms:play-services-location:15.0.0'
    implementation 'com.google.firebase:firebase-appindexing:15.0.0'
    implementation 'com.google.android.gms:play-services-auth:15.0.0'
    implementation 'com.google.android.gms:play-services-auth-base:15.0.0'
        implementation 'com.google.android.gms:play-services-panorama:15.0.0'
    implementation 'com.google.android.gms:play-services-ads:15.0.0'
    implementation('com.google.firebase:firebase-messaging:15.0.0') {
        exclude group: 'com.android.support', module: 'support-v4'
        exclude group: 'com.android.support', module: 'support-annotations'
    }
    implementation 'com.google.firebase:firebase-core:15.0.0'

    implementation 'org.jsoup:jsoup:1.8.3'

    }

Gradle-wrapper-properties

distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

build.gradle

dependencies {
    classpath 'com.android.tools.build:gradle:3.0.1'
    classpath 'com.google.gms:google-services:3.2.0'
dev90
  • 7,187
  • 15
  • 80
  • 153
  • You already have `play-services-base`. `play-services-basement` is unnecessary: https://stackoverflow.com/questions/36461656/play-services-base-versus-basement-dependencies-aar-in-android. Also, 15.0.0 is outdated and most Play Services are at 16.0.x. – TheWanderer Oct 11 '18 at 19:37

1 Answers1

0

I ran into this same error when compiling my project, though I didn't directly include a dependency for play-services-basement. What fixed it for me was I updated all my other dependencies to the newest versions and re-synced Gradle.

Mick
  • 676
  • 5
  • 12