Reputation: 39
I need to make a floating circular menu And I need to add a library to my project Finally i found a library that would help me do that
implementation 'com.github.recruit-lifestyle:FloatingView:2.4.4'
When i add this library in my gradle i get an error
This is the error :
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.github.recruit-lifestyle:FloatingView:2.4.4.
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.github.recruit-lifestyle:FloatingView:2.4.4.
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve com.github.recruit-lifestyle:FloatingView:2.4.4.
does anyone know why is that?!
And I have tried to add other libraries, but every time I get the same error
How can i solve this problem?
Edit1 This is my build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
applicatiomId "com.example.project"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefultProguardFile ('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependency {
implementation fileTree (dir: 'libs', include: ['*.jar])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayouy:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit::1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
//This is the library I want to add
implementation 'com.github.recruit-lifestyle:FloatingView:2.4.4'
}
Edit2 My build.gradle (Project)
buildscript {
repositories {
google ()
jcenter ()
}
dependency {
classpath 'com.android.tools.build:gradle:3.5.3'
}
}
allprojects {
repositoriss {
google ()
jcenter ()
maven {
url "https://jitpack.io"
}
}
}
task clean (type: Delete){
delete rootProject.buildDir
}
Upvotes: 0
Views: 135
Reputation: 3514
Try adding below one:
dependencies {
implementation 'com.github.recruit-lifestyle:floatingview:2.4.5'
}
I checked it here and found that this one is working.
Also add this to your build.gradle (project)
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Also make sure to uncheck the Gradle Offline option in Settings.
File > Settings > Build, Execution, Deployment > Gradle > Uncheck Offline Work
Upvotes: 1