Reputation: 1759
I want to use this Material Design :
https://github.com/navasmdc/MaterialDesignLibrary
I have Imported it into my project and changed version numbers in build.gradle
of it to versions of build.gradle
of my app
Now there is a build error :
Error:(24, 13) Failed to resolve: com.nineoldandroids:library:2.4.+
I have searched and founded some solutions such as change 2.4.+
to 2.4.0
! or this link, but they didn`t solve the problem
The question is :
When a project imported, what should be same in imported build.gradle
versions and my app build.gradle
versions ?!
My project compile in offline mode, Should I disable offline mode and let the Android Studio to download gradle files needed ?
Upvotes: 0
Views: 1383
Reputation: 10939
As the link for the library says, do the following in the build.gradle. Copy the compile statement below in the dependencies tag. Your library name was wrong.
repositories {
jcenter()
}
dependencies {
compile 'com.github.navasmdc:MaterialDesign:1.5@aar'
}
You will find the dependencies in the build.gradle in the app folder not in the project folder.
You need to disable offline mode. After the library is imported you can go back to offline mode.
About the cannot resolve error: nineoldandroid library is very old and now deprecated. I believe the material design library is using NineoldAndroid library. For some reason, it not able download this library. Why don't you add the nineoldandroid library first. If the material design library finds it then it may not try to download it.
Upvotes: 1