I want to display a dialog box to display a message along with two buttons (SignIn and Close). But it's giving me a Resource Linking Failed error. though I have a dependency of cardview in my build gradle file (app). Application runs with zero errors but build is failing.
Вот несколько способов, которыми я пытался его синхронизировать:
implementation 'com.android.support:cardview-v7:+'
implementation 'com.android.support:cardview-v7:28.0.0-alpha3'
compile 'com.android.support:cardview-v7:28.0.0'
Вот ошибки в журнале событий: 9:25 Эмулятор: эмулятор: ПРЕДУПРЕЖДЕНИЕ: UpdateCheck: Ошибка: Ошибка
9: 26 AM Сбой сборки Gradle за 1 м 15 с 453 мс
9: 26 AM Эмулятор: эмулятор: ПРЕДУПРЕЖДЕНИЕ: AsyncSocketServer.cpp: 99: Ошибка при приеме соединения с хостом. Сообщение об ошибке: неизвестная ошибка
9: 26 AM Выполнение задач: [: app: assemblyDebug] в проекте C: \ Users \ Maryam \ AndroidStudioProjects \ Sign_Up
9: 26 AM Сбой сборки Gradle за 18 с 154 мс
9: 26 AM Build APK (s): Ошибки при сборке APK. Вы можете найти ошибки в представлении «Сообщения».
9: 29 AM Синхронизация Gradle, запущенная с однофакторной синхронизацией
9: 30 AM Сбой синхронизации Gradle: не удалось найти реализацию метода () для аргументов [com.android.support:cardview-v7:26.+] для объекта типа org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. (8 с 722 мс) Вот мой файл сборки Gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.example.sign_up"
minSdkVersion 15
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
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.android.material:material:1.0.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0'
implementation 'androidx.vectordrawable:vectordrawable:1.0.1'
implementation 'androidx.navigation:navigation-fragment:2.0.0'
implementation 'androidx.navigation:navigation-ui:2.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation 'com.android.support:cardview-v7:+'
}