安装Android Studio 4.0后 无法解决:com.github.navasmdc:MaterialDesign:1.5。

问题描述 投票:0回答:1

我使用的是 com.github.navasmdc:MaterialDesign:1.5 没有问题,但升级后的Android Studio,当我试图建立这个错误。

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

我试着在GitHub上搜索libray,但没有一个更新的版本。我上传了所有的实现,并没有解决它太。我升级和降级的插件,但没有解决我的问题。

我还能做什么?我想把Android Studio降级到3.6版本。

我的build gradle文件。

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'

其他

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
}
android-studio material-design upgrade resolve project-structure
1个回答
0
投票

在Android Studio上进行了测试,结果显示:Failed resolve: com.github.navasmdc:MaterialDesign:1.5 ..:

  • 最新的稳定版 - 3.6.3

  • 最新的金丝雀 - 4.1. Beta 1

和。

和: @aar (在最后)

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

并与废弃的 compile

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

请勿在没有工作的情况下工作。@aar (在最后)

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

也不能与废弃的 compile

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

解决办法

所以也许你没有加 @aar 对你的依赖性。

你发布了 1.5但应该是 1.5@aar

© www.soinside.com 2019 - 2024. All rights reserved.