0

This is my build gradle, any help fixing this error? I am also having a error :

failed resolve com.google.android.gms:play-services-maps:14.0.4

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion '26.0.0'
    useLibrary 'org.apache.http.legacy'
    defaultConfig {
        applicationId "com.Kreatech.handje"
        minSdkVersion 23
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
    productFlavors {
    }
}

dependencies {
    compile files('libs/httpmime-4.1.3.jar')
    //===============
    compile 'com.mikhaellopez:circularimageview:2.0.2'
    compile 'com.mcxiaoke.volley:library:1.0.6@aar'
    compile files('libs/Parse-1.6.0.jar')
    compile 'junit:junit:4.12'
    compile 'com.android.support:support-v4:26.0.0'
    compile 'com.google.android.gms:play-services-maps:14.0.4'
    compile 'com.google.android.gms:play-services-ads:11.0.4'
    compile 'com.google.android.gms:play-services-auth:11.0.4'
    compile 'com.google.android.gms:play-services-gcm:11.0.4'
}
ɢʀᴜɴᴛ
  • 32,025
  • 15
  • 116
  • 110
Drxj
  • 15
  • 1
  • 1
  • 4
  • post your build.gradle file of Appliaction level – Asif Patel Aug 23 '17 at 22:27
  • Possible duplicate of [Failed to resolve: com.android.support:support-v4:23.0.0](https://stackoverflow.com/questions/33185086/failed-to-resolve-com-android-supportsupport-v423-0-0) – Persistent13 Aug 24 '17 at 03:47

3 Answers3

0

https://developer.android.com/topic/libraries/support-library/setup.html

To add a Support Library to your application project:

Open the build.gradle file for your application. Make sure that the repositories section includes a maven section with the "https://maven.google.com" endpoint. For example:

allprojects {
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
}
dmastra
  • 439
  • 3
  • 9
  • Thank you it works now , im getting this following error ,,Error:Execution failed for task ':app:processReleaseResources'. > com.android.ide.common.process.ProcessException: Failed to execute aapt – Drxj Aug 24 '17 at 17:54
0

Add this code in build.gradle file of Application level

allprojects {
repositories {
    jcenter()
    maven {
        url "https://maven.google.com"
    }
}
}
Asif Patel
  • 1,744
  • 1
  • 20
  • 27
  • it worked but now im having 6Errors :: Error:(3, 29) No resource found that matches the given name (at 'drawable' with value '@drawable/common_google_signin_btn_icon_light_normal_background'). – Drxj Aug 24 '17 at 17:56
0

I ended up having a gradle dependency that required an old version of the support library, so the build was deciding to use the old version.

I found this out by running a "Gradle dependency report" described here:

./gradlew -q dependencies app:dependencies \
  --configuration debugAndroidTestCompileClasspath >& foo.txt

I then updated the old dependency, and this started to work.

dfrankow
  • 20,191
  • 41
  • 152
  • 214