Hello kind people of the internet.
My name is Paul.
I've started to learn Android development using Kotlin, lately I've been following a couple of tutorials regarding RecyclerView, LiveData and Lifecycle.
At first I honestly forgot to declare the dependencies inside my gradle script. But I have discovered that the functionality actually works as expected.
Can somebody please explain to me this phenomenon:
- is it because Android Studio "saw" my imports and automatically "defined" and downloaded the dependencies ?
- is it because of the compileSdk version?
Here is a sample of my dependencies block from one of my projects
dependencies {
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
Also here is my config
defaultConfig {
applicationId "com.example.myrecycler"
minSdk 23
targetSdk 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Thank you!