After install Android Studio 4.0 Failed to resolve: com.github.navasmdc:MaterialDesign:1.5

Viewed 840

I use com.github.navasmdc:MaterialDesign:1.5 without problem, but after upgrade an Android Studio when I try to build give me this error:

Failed to resolve: com.github.navasmdc:MaterialDesign:1.5
Show in Project Structure dialog
Affected Modules: app

I tried to search in the GitHub of the libray but there isn't a newer version. I uploaded all implementations, and don't solve it too. I upgraded and downgraded the plugin but nothing solved my problem.

What more can I do? I think to downgrade Android Studio in to version 3.6.

my build gradle files:

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'



 android {
    compileSdkVersion 29
    defaultConfig {
        applicationId "com.taximetro.spia"
        minSdkVersion 21
        targetSdkVersion 29
        versionCode 1021
        versionName "2.0.5"
        multiDexEnabled true
        buildConfigField 'String', 'BUILD_TIME', 'new java.text.SimpleDateFormat("yyyy/MM/dd HH:mm:ss", java.util.Locale.getDefault()).format(new java.util.Date(' + System.currentTimeMillis() + 'L))'
    }

    lintOptions.abortOnError false

    packagingOptions {
        pickFirst 'lib/arm64-v8a/libtlvtree.so'
        pickFirst 'lib/armeabi-v7a/libpcltools.so'
        pickFirst 'lib/armeabi/libpcltools.so'
        pickFirst 'lib/armeabi/libtlvtree.so'
        pickFirst 'lib/x86/libpcltools.so'
        pickFirst 'lib/arm64-v8a/libpcltools.so'
        pickFirst 'lib/armeabi-v7a/libtlvtree.so'
        pickFirst 'lib/x86_64/libtlvtree.so'
        pickFirst 'lib/x86_64/libpcltools.so'
        pickFirst 'lib/x86/libtlvtree.so'
    }

    dexOptions {
        preDexLibraries = false
    }

    sourceSets {
        main {
            //manifest.srcFile 'AndroidManifest.xml'
            //java.srcDirs = ['src']
            //res.srcDirs = ['res']
            assets.srcDirs = ['assets']
            jniLibs.srcDirs = ['../../SDK/Native Libraries']
        }
    }

    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }


    buildTypes {
        release {
            signingConfig signingConfigs.release
            debuggable false
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility = '1.8'
        targetCompatibility = '1.8'
    }

    packagingOptions {
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/DEPENDENCIES'

        exclude 'org/apache/http/version.properties'
        exclude 'org/apache/http/client/version.properties'
    }

    dexOptions {
        javaMaxHeapSize "4g"
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    lintOptions {
        abortOnError false
    }

}

dependencies {
    def lifecycle_version = "1.1.1"
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    //noinspection GradleCompatible
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.google.android.material:material:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.android.gms:play-services-maps:17.0.0'
    testImplementation 'junit:junit:4.13'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.android.gms:play-services-location:17.0.0'
    implementation 'androidx.gridlayout:gridlayout:1.0.0'
    implementation 'com.google.android.gms:play-services-maps:17.0.0'
    implementation 'com.google.android.gms:play-services-location:17.0.0'
    implementation 'com.google.android.gms:play-services-places:17.0.0'
    implementation 'com.google.http-client:google-http-client-gson:1.17.0-rc'
    implementation project(':PclServiceLib_2.04.00')
    implementation project(':PclUtilities_2.04.00')
    implementation 'com.github.gcacace:signature-pad:1.2.1'
    implementation 'androidx.cardview:cardview:1.0.0'

    implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'


    implementation 'com.squareup.retrofit2:retrofit:2.6.1'

    implementation 'io.reactivex.rxjava2:rxjava:2.2.11'
    implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
    implementation 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
    implementation 'com.google.code.gson:gson:2.8.6'

    implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
    implementation 'androidx.core:core:1.2.0'

    implementation 'com.github.navasmdc:MaterialDesign:1.5@aar'
    //HotsPot
    implementation 'com.linkedin.dexmaker:dexmaker:2.25.0'
    //firebase
    implementation 'com.google.firebase:firebase-analytics:17.4.2'

the other

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.3'
        classpath 'com.google.gms:google-services:4.3.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenCentral()
        google()
        jcenter()
    }
}

ext{
    compileSdkVersion = 26
    supportLibVersion = "27.0.0"
    minSdkVersion = 14
    defaultTargetSdkVersion = 26
}


task clean(type: Delete) {
    delete rootProject.buildDir
}
2 Answers

Tested on Android Studio:

  • latest stable - 3.6.3

  • latest canary - 4.1. Beta 1

and:

WORKS with @aar (at the end)

implementation 'com.github.navasmdc:MaterialDesign:1.5@aar'

and with deprecated compile

compile 'com.github.navasmdc:MaterialDesign:1.5@aar'

DO NOT WORK without @aar (at the end)

implementation 'com.github.navasmdc:MaterialDesign:1.5'

also do not work with deprecated compile

compile 'com.github.navasmdc:MaterialDesign:1.5'

Solution

So maybe you did not add @aar to your depenency.

You posted 1.5, but should be 1.5@aar

Finally i have to invalidate cache and restart to build gradle files, seems tha a old file cant update

Related