Error while executing project in Android Studio

-3

Well I'm getting an error, and I need a help from you my friends, I'll post my grandle and the error that is happening.

When I run my project it shows me the error message in biuld as follows.

  

Could not find method implementation () for arguments   [com.android.support:cardview-v7:27.0.0] on repository container of   type org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler.

     

Please install the Android Support Repository from the Android SDK   Manager.

My Grandle is like this !!

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

buildscript {
    repositories {
        jcenter()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.0'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
        classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3"
        classpath 'com.google.gms:google-services:3.1.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        maven { url 'https://jitpack.io' }
        maven {
            url 'https://maven.google.com'
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

How do I correct this?

    
asked by anonymous 16.12.2018 / 21:11

1 answer

4
  

Please install the Android Support Repository from the Android SDK Manager.

As the message itself says, you should install the Support Library , follow the steps below:

  • Start the Android SDK Manager
  • In the SDK Manager window, scroll to the end of the Packages list, find the Extras folder, expand it if necessary to display the content.
  • Select the Android Support Repository
  • Click the Install packages button
  • Source: Support Library Configuration

    Another solution is to upgrade the dependencies, especially Gradle to (or a newer one):

    classpath 'com.android.tools.build:gradle:3.1.2'
    
        
    16.12.2018 / 21:24