1
votes

I have an error with lint-gradle-api.jar, I looked at other similar questions on the forums but I still have the problem. Does anyone have an idea ?

  • Error running Gradle: Exit code 1 from: C:\Users\bgbra\Documents\Flutter_apps\flutter_app\android\gradlew.bat app:properties: Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.

FAILURE: Build failed with an exception.

  • Where: Build file 'C:\Users\bgbra\Documents\Flutter_apps\flutter_app\android\app\build.gradle' line: 25

  • What went wrong: A problem occurred evaluating project ':app'. Could not resolve all artifacts for configuration 'classpath'. Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2). Searched in the following locations: https://jcenter.bintray.com/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

build.gradle

buildscript {
    repositories {
        google()
        jcenter()
        maven {
            url 'https://dl.google.com/dl/android/maven2'
        }
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
    }
    }

allprojects {
    repositories {
        google()
        jcenter()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

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

1 Answers

1
votes

This is my build.gradle file. I don't know, will it help you.

buildscript {
    ext.kotlin_version = '1.3.10'

    repositories {
        google()
        jcenter()
        maven {
            url 'https://dl.google.com/dl/android/maven2'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'com.google.gms:google-services:3.2.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

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

// global properties used in sub modules
ext {
    versionCodeProp = 81100
    versionNameProp = "0.8.11-dev"
    versionBuild = System.getenv("BUILD_NUMBER") as Integer ?: 0
    buildNumberProp = "${versionBuild}"
}

allprojects {
    repositories {
        jcenter()

        maven {
            url "https://maven.google.com"
        }
        google()
    }
}

Probably you shoul add maven to allprojects branch.