Update android project

0

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

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

But this is returning 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

Someone can help me do this, without me having to keep trying to update, go back version and download a thousand things until I burst my memory, someone who knows exactly what is happening.

    
asked by anonymous 28.03.2018 / 20:48

2 answers

1

I was able to resolve updating aligns to classpath 'com.android.tools.build:gradle:2.3.2'

    
28.03.2018 / 21:17
1

Marcius, since you will upgrade 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 file

gradle-wrapper.properties
    
29.03.2018 / 14:38