Solution 1 :
Make sure you added MavenCentral in you gradle
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
Problem :
I want to use LottieAnimationView in my project but it doesn’t show in my library and i can’t add it.
My Module/build.gradle file:
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android' }
android {
compileSdk 32
defaultConfig {
applicationId "com.example.denemecalisma"
minSdk 23
targetSdk 32
versionCode 1
versionName "1.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
viewBinding true
}
sourceSets {
main {
assets {
srcDirs 'src\main\assets'
}
}
} }
dependencies {
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation 'com.airbnb.android:lottie:5.2.0' }
I added it in depencies and synced build.gradle but i can’t see it. Can you help me about this ?