Android Gradle exception sync with Smooth Progress Bar project

I am trying to add this library , but when I try to synchronize Gradle, the compiler gave me this error:

Error: (6, 13) Failed to solve: com.github.castorflex.smoothprogressbar: library: 1.1.0

And if it is important to solve this problem, I have this another problem in my project, published in stack overflow.

This is what my project structure looks like:

enter image description here

And these are the build.grade files of all projects

The main warp project (guestperience 1.0.1 Moncloa De San Lazaro):

// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.2.0' } } 

goSmart.guestperience.MoncloaDeSanLazaro (here I am the code):

 apply plugin: 'com.android.application' dependencies { compile fileTree(dir: 'libs', include: '*.jar') compile project(':librarySmartHotel') compile 'com.google.android.gms:play-services:7.3.0' compile 'com.github.castorflex.smoothprogressbar:library:1.1.0' } android { compileSdkVersion 16 buildToolsVersion "22.0.1" 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') } } 

librarySmartHotel:

 apply plugin: 'com.android.library' dependencies { compile fileTree(dir: 'libs', include: '*.jar') compile project(':main') } android { compileSdkVersion 16 buildToolsVersion '22.0.1' 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') } } 

home:

 apply plugin: 'com.android.library' dependencies { compile fileTree(dir: 'libs', include: '*.jar') } android { compileSdkVersion 16 buildToolsVersion '22.0.1' 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') } } 

I think some configuration is missing (maybe), the truth is that I'm super lost.

The only thing I see is that the library does not even load in the External Libraries section.

UPDATE:

I see that this is something global in my Android studio, I can not add anything from another data repository.

+1
source share
1 answer

You just need to add this at the beginning of the file:

 repositories { mavenCentral() } 

You can also enable the "Offline mode".

Check if File -> Build, Execution, Deployment-> Maven / Gradle "Offline" is turned on, if it is just turning it off and Sync Gradle.

It's all.

And in my case, I also added this due to the Services Services:

 defaultConfig { multiDexEnabled true } 

You will end up with this file:

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') } } 
0
source

Source: https://habr.com/ru/post/986492/


All Articles