Error while running project in Android Studio

Asked

Viewed 175 times

-3

Well I’m getting an error, and I need some help from you my friends, I’ll post my grandle and the mistake that’s going on.

When I run my project it displays me the error message in the 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 should I correct this problem ?

1 answer

5

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

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

  1. Initiate the Android SDK Manager
  2. At the window of SDK Manager, scroll to the end of the list Packages, find the folder Extras and, if necessary, expand it to display the content.
  3. Select the item Android Support Repository
  4. Click the button Install Packages

Android SDK Manager

Source: Support Library Settings


Another solution is to update dependencies, mainly Gradle to (or another more recent):

classpath 'com.android.tools.build:gradle:3.1.2'

Browser other questions tagged

You are not signed in. Login or sign up in order to post.