Update android project

Asked

Viewed 367 times

0

I have in my hand a project 3 years ago and I need to put it to run, so when I opened the project in android studio already gave the default error Gradle, I changed the line

classpath 'com.android.tools.build:gradle:1.0.0-rc2' -> classpath 'org.gradle:gradle 2.2.1'

But this returning me the following error:

Error:Could not find org.gradle:gradle 2.2.1:.
Searched in the following locations:
    file:/C:/Program Files/Android/Android Studio/gradle/m2repository/org/gradle/gradle 2.2.1//gradle 2.2.1-.pom
    file:/C:/Program Files/Android/Android Studio/gradle/m2repository/org/gradle/gradle 2.2.1//gradle 2.2.1-.jar
    https://jcenter.bintray.com/org/gradle/gradle 2.2.1//gradle 2.2.1-.pom
    https://jcenter.bintray.com/org/gradle/gradle 2.2.1//gradle 2.2.1-.jar
    https://repo1.maven.org/maven2/org/gradle/gradle 2.2.1//gradle 2.2.1-.pom
    https://repo1.maven.org/maven2/org/gradle/gradle 2.2.1//gradle 2.2.1-.jar
Required by:
    :android:unspecified

Can someone help me do that without me having to keep trying to upgrade, back version and download a thousand things until my memory bursts, someone who knows exactly what’s going on.

2 answers

1


I managed to resolve updating line to classpath 'com.android.tools.build:gradle:2.3.2'

1

Marcius, since you’re updating the app, consider using the latest version of Gradle, which is 'com.android.tools.build:gradle:3.1.0'.

Probably to find this version, you also need to change this line distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip inside the archive

gradle-wrapper.properties

Browser other questions tagged

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