Search code examples
androidgradleandroid-maps-utils

Failed to resolve - android maps utils


i'm creating module with GPS tracking. I've got there only track implementation.

What i need is PolyUtil so i set in gradle:

dependencies {
    compile 'com.google.maps.android:android-maps-utils:0.4'
}

After gradle sync i've got error:

Failed to resolve: com.google.maps.android:android-maps-utils:0.4

EDIT: This is my build.gradle:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'me.tatarka:gradle-retrolambda:3.2.4'
    }
}

apply plugin: 'com.android.library'
apply plugin: 'me.tatarka.retrolambda'

repositories {
    mavenCentral()
}

android {
    compileSdkVersion 23
    buildToolsVersion = "23.0.2"
    useLibrary 'org.apache.http.legacy'

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 23
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    compile 'com.google.maps.android:android-maps-utils:0.4'
}

Any suggestions?


Solution

  • It looks like the reason is that I am creating a library:

    apply plugin: 'com.android.library'
    

    After switch to application:

    apply plugin: 'com.android.application'
    

    Error doesn't show anymore.

    This doesn't fix my problem but maybe it will solve someone's problem.