Android Gradle Sync Exception With The Smooth Progress Bar Project
I'm trying to add this library but when I try to sync Gradle the compiler give me this error: Error:(6, 13) Failed to resolve: com.github.castorflex.smoothprogressbar:library:1.
Solution 1:
You just have to add this at the beginning of the file:
repositories {
mavenCentral()
}
Also you may have "Offline mode" enabled.
Check if File -> Build,Execution,Deployment-> Maven/Gradle "Offline work" is enabled, if so just disable it and Sync Gradle.
This was all.
And in my case I have also added this because of the Play Services:
defaultConfig {
multiDexEnabled true
}
You will end with a file like this:
apply plugin: 'com.android.application'
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile project(':librarySmartHotel')
compile 'com.github.castorflex.smoothprogressbar:library:1.1.0'
compile 'com.google.android.gms:play-services:6.5.87'
}
android {
compileSdkVersion 19
buildToolsVersion "22.0.1"
defaultConfig {
multiDexEnabled true
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')
// Move the build types to build-types/<type>// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...// This moves them out of them default location under src/<type>/... which would// conflict with src/ being used by the main source set.// Adding new build types or product flavors should be accompanied// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
}
Solution 2:
I've had the same problem when updated android studio to last version then I simply updated Project:Grandle version to stable the error's gone
Post a Comment for "Android Gradle Sync Exception With The Smooth Progress Bar Project"