B
B
Brenly2020-02-14 23:24:47
Android
Brenly, 2020-02-14 23:24:47

How to change dependencies in build.gradle?

Hello.
I continue the course and faced with the fact that the video uses a completely different path to the repositories.

implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.android.support:appcompat:appcompat-v7:26.1.0'

Is it enough to just write the addresses and versions of the libraries as in the examples, or does something global need to be changed?
Is it possible to invoke the visual wizard to edit and search for libraries?

I am making an app for android 21.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Zagaevsky, 2020-02-14
@zagayevskiy

Just use the latest release version (1.1.0) https://developer.android.com/jetpack/androidx/rel...
Just change it in build.gradle and sync in the studio.
There are no visual editors, and they are not needed.

Y
Yuri, 2020-02-16
@YuryBorodkin

This is the `selling point` of Gradle in general, the ability to simply write dependencies and everything will start. But - gradle needs to have a repository in which this dependency will be located.
In the default structure of the project created by the studio, in the root project, in `build.gradle` you must remember to write

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

because either jetpack is in the `google()` repository.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question