0

I'm trying to use com.github.navasmdc:MaterialDesign:1.5 but it gives me an error saying :

Could not resolve com.github.navasmdc:MaterialDesign:1.5.
 Required by:
     project :app
  > Could not resolve com.github.navasmdc:MaterialDesign:1.5.
     > Could not get resource 'https://jitpack.io/com/github/navasmdc/MaterialDesign/1.5/MaterialDesign-1.5.pom'.
        > Could not GET 'https://jitpack.io/com/github/navasmdc/MaterialDesign/1.5/MaterialDesign-1.5.pom'. Received status code 401 from server: Unauthorized

This is what I have in build.gradle :

apply plugin: 'com.android.application'

android {
compileSdkVersion 29
buildToolsVersion "28.0.3"

defaultConfig {
    minSdkVersion 15
    targetSdkVersion 29
    versionCode 21
    versionName "1.0.4.1"
    javaCompileOptions {
        annotationProcessorOptions {
            includeCompileClasspath false
        }
    }
}

flavorDimensions "pro"

productFlavors {
    pro {
        applicationId = "com.javiersantos.mlmanagerpro"
    }

}
flavorDimensions "basic"
productFlavors {
    basic {
        applicationId = "com.javiersantos.mlmanager"
    }
}


buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }

    debug {
        versionNameSuffix '-debug'
    }
}

lintOptions {
    disable 'MissingTranslation'
}

packagingOptions {
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
}
}

repositories {

mavenCentral()
maven { url 'http://guardian.github.com/maven/repo-releases' }
maven {
    url "https://maven.google.com"
}
maven { url "https://jitpack.io" }
}

dependencies {

implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'commons-io:commons-io:2.4'

//    implementation group: 'com.github.navasmdc', name: 'MaterialDesign', version: '1.5'

implementation 'com.getbase:floatingactionbutton:1.10.1'
implementation('com.github.afollestad.material-dialogs:core:0.8.5.3@aar') { transitive = true; }
implementation('com.github.afollestad.material-dialogs:commons:0.8.5.3@aar') {
    transitive = true;
}
implementation 'com.github.yukuku:ambilwarna:2.0.1'
implementation 'com.pnikosis:materialish-progress:1.7'
implementation 'xyz.danoz:recyclerviewfastscroller:0.1.3'
implementation 'com.yalantis:phoenix:1.2.2'
implementation('com.mikepenz:materialdrawer:4.6.1@aar') { transitive = true; }
implementation 'com.mikepenz:google-material-typeface:1.2.0.1@aar'
implementation('net.rdrei.android.dirchooser:library:3.0@aar') { transitive = true; }
implementation('com.mikepenz:aboutlibraries:5.2.1@aar') { transitive = true; }
annotationProcessor 'com.google.auto.value:auto-value:1.5.2'
implementation 'com.github.navasmdc:MaterialDesign:1.5@aar'
}

Why should I get authorized for using a library?

Note: I have tried putting jcenter() and google() too.

5
  • can you please upload your build.gradle file(project)? Apr 16, 2020 at 20:36
  • My ping jitpack.io is too low (450ms). Can it happen because of that?
    – Omid.N
    Apr 16, 2020 at 20:50
  • upload your build.gradle file first then I will let you know Apr 16, 2020 at 20:52
  • Actually this app is not mine. It is the source code of MLManager app.
    – Omid.N
    Apr 16, 2020 at 21:02
  • Look at last line in the file. That's where I have put that dependency.
    – Omid.N
    Apr 16, 2020 at 21:04

1 Answer 1

1

This library is an old one and you should use modern material design components that android has presented in its core and packages like androidx.

However main issue with your error is that the repository has added authorization and you need to have credentials(username + password) to get access. As I told library is old and the last contribution has happened about 4 years ago Thus author may be put credentials recently and forgot to give access to library.

If you really need to use this library here is the link of its aar file, download it and add it manually to your gradle project.

2
  • Which folder should I put it in?
    – Omid.N
    Apr 16, 2020 at 21:08
  • I added through Project Structure. Thanks alot. +1
    – Omid.N
    Apr 16, 2020 at 21:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.