Не удалось найти cardview.jar (androidx.cardview: cardview: 1.0.0) - PullRequest
0 голосов
/ 22 октября 2019

Мой проект работал нормально, но сегодня, когда я открыл его, в нем была эта ошибка, хотя я не использовал просмотр карт. Мой другой проект работает нормально, но только этот проект не собирается.

Не удалось найти cardview.jar (androidx.cardview: cardview: 1.0.0).

Мой путь к классу: classpath'com.android.tools.build:gradle:3.5.1'

Я добавил библиотеку карт вручную, но она тоже не сработала.

Я добавил

maven {
            url "https://maven.google.com"
        }

но это тоже не сработало.

Я добавил библиотеку карточек вручную, но она тоже не сработала.

это мой уровень проекта с кодом Gradle

buildscript {
    repositories {
        google()
        jcenter()
        maven { url 'https://maven.fabric.io/public' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.1'

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

allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }
        maven {
            url "https://maven.google.com"
        }
        maven { url 'https://maven.fabric.io/public' }

    }
}

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

и это мой уровень приложения с кодом gradle

применить плагин: 'com.android.application'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.2"
    defaultConfig {
        applicationId "com.intechdev.tcommerce"
        minSdkVersion 21
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.code.gson:gson:2.8.5'
    implementation 'io.reactivex.rxjava2:rxjava:2.1.9'
    implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
    implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
    implementation 'com.squareup.retrofit2:retrofit:2.6.2'
    implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'androidx.exifinterface:exifinterface:1.0.0'
    implementation 'com.github.tiper:MaterialSpinner:1.3.3'
    implementation 'de.hdodenhof:circleimageview:3.0.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.2.0'
    implementation 'com.google.code.gson:gson:2.8.5'
    implementation 'com.google.android.gms:play-services-auth:17.0.0'
    implementation 'com.mikhaellopez:circularimageview:4.0.2'
    implementation "androidx.preference:preference:1.1.0"
    implementation 'com.android.support:multidex:1.0.3'
    implementation "com.github.bumptech.glide:glide:4.9.0"
    implementation 'com.iarcuschin:simpleratingbar:0.1.5'
    annotationProcessor "com.github.bumptech.glide:compiler:4.9.0"
    implementation "com.github.firdausmaulan:GlideSlider:1.5.1"
    api 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
    implementation 'com.justkiddingbaby:vercodeedittext:1.1.0'
    implementation 'com.google.android.material:material:1.1.0-beta01'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

Ответы [ 2 ]

0 голосов
/ 23 октября 2019

Просто удалите

    implementation "com.github.firdausmaulan:GlideSlider:1.5.1"

и используйте другую библиотеку слайдеров.

0 голосов
/ 22 октября 2019

вы не добавили библиотеку CardView.

добавьте это к своим зависимостям в новой строке:

 implementation 'androidx.cardview:cardview:1.0.0'

и затем синхронизируйте свои файлы Gradle, это должно решить проблему.

...