0

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?

Marcin Bortel
  • 1,190
  • 2
  • 14
  • 28

2 Answers2

4

In my case I had to compile 'com.google.maps.android:android-maps-utils:0.5' instead of 'com.google.maps.android:android-maps-utils:0.5.+' that official docs suggest.

temirbek
  • 1,415
  • 1
  • 14
  • 27
0

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.

MLavoie
  • 9,671
  • 41
  • 36
  • 56
Marcin Bortel
  • 1,190
  • 2
  • 14
  • 28