Araz Mohammadnejad
Araz Mohammadnejad

Reputation: 41

Generate Signed APK gives an error in Android Studio 3.4

Build APK and run application on external device work properly, but When I am trying to generate signed APK I got the error message

Could not find com.android.tools.lint:lint-gradle:26.4.

Here is my Project build.gradle

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.2'
    }
}
allprojects {
    repositories {
        google()
        jcenter()
        maven { url "https://jitpack.io" }
        //mavenCentral()
    }
}

some of articles suggest to change classpath version but I think 3.4.2 is the latest version of gradle.

Upvotes: 0

Views: 158

Answers (2)

shizhen
shizhen

Reputation: 12573

You should put google() as the first repo inside buildscript{}, i.e.

buildscript {
    repositories {
        google() //// <--- here
        jcenter()

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

Upvotes: 0

Araz Mohammadnejad
Araz Mohammadnejad

Reputation: 41

By updating my android studio to 3.5, problem was fixed. I don't know the reason. this one was my last chance

Upvotes: 1

Related Questions