Error Installing Google Maps SDK Beta 3.1.0 Could not filnd :places-map-sdk-3.1.0-beta:

Viewed 458

I am attempting to install the Google Maps SDK and decided to use the current beta version. I have followed all the installation instructions, but am getting the following error when rebuilding the project.

Execution failed for task ':app:checkDebugAarMetadata'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Could not find :places-maps-sdk-3.1.0-beta:. Required by: project :app

The installation downloaded file places-maps-sdk-3.1.0-beta.aar has been placed in the projects app\libs folder.

[![enter image description here][1]][1]

Attached is my project level gradle build

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
    compileSdkVersion 29
    buildToolsVersion "29.0.2"
    defaultConfig {
        applicationId "com.grgapps.checkingin"
        minSdkVersion 26
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
        customDebugType {
            debuggable true
        }
    }
    compileOptions {
        sourceCompatibility = 1.8
        targetCompatibility = 1.8
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar','*.aar'])
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'com.google.android.material:material:1.2.1'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.navigation:navigation-fragment:2.3.1'
    implementation 'androidx.navigation:navigation-ui:2.3.1'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'androidx.recyclerview:recyclerview:1.1.0'
    implementation 'com.google.android.gms:play-services-ads:19.5.0'
    implementation 'com.google.firebase:firebase-ads:19.5.0'
    implementation 'androidx.work:work-runtime:2.5.0-beta01'
    implementation 'androidx.preference:preference:1.1.1'
    //implementation 'com.google.android.gms:play-services-maps:17.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    implementation "androidx.viewpager2:viewpager2:1.0.0"
    implementation 'com.google.firebase:firebase-analytics:18.0.0'
    implementation "com.google.firebase:firebase-messaging:21.0.0"

    implementation 'com.google.android.libraries.maps:maps:3.1.0-beta'

    // If you are using Places, add all of the dependencies below
    implementation name:'places-maps-sdk-3.1.0-beta', ext:'aar'
    implementation 'com.google.android.gms:play-services-gcm:17.0.0'
    implementation 'com.google.auto.value:auto-value-annotations:1.6.5'
    implementation 'com.google.maps.android:android-maps-utils-v3:2.2.0'


    implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'

    implementation('com.mikepenz:materialdrawer:5.9.5@aar') {
        transitive = true
        exclude group: 'com.android.support'
    }
    // Room components
    implementation "androidx.room:room-runtime:2.2.5"
    annotationProcessor "androidx.room:room-compiler:2.2.5"
    androidTestImplementation "androidx.room:room-testing:2.2.5"

    // Lifecycle components
    implementation "androidx.lifecycle:lifecycle-extensions:$rootProject.archLifecycleVersion"
    annotationProcessor "androidx.lifecycle:lifecycle-compiler:$rootProject.archLifecycleVersion"

    // UI
    implementation "com.google.android.material:material:1.2.1"

    // Testing
    androidTestImplementation "androidx.arch.core:core-testing:$rootProject.coreTestingVersion"
}



The following is my top level build gradle file

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        google()
        jcenter()
        flatDir {
            dirs 'libs'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.1'
        classpath 'com.google.gms:google-services:4.3.3'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
ext {
    roomVersion = '2.2.5'
    archLifecycleVersion = '2.2.0-rc03'
    coreTestingVersion = '2.1.0'
    materialVersion = '1.2.1'
}
1 Answers

I found that instead of using the line they have in their documentation for the build.gradle file:

implementation name:'places-maps-sdk-3.1.0-beta', ext:'aar'

If I use this line, it syncs up fine:

implementation group: 'com.google.android.libraries.maps', name: 'maps', version: '3.1.0-beta'

I am FAR from a Gradle expert, so I am not quite sure what the differences here are - but after changing over imports and all, my app built and seemed to operate fine.

Related