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.
Here are the different ways I tried to sync it:
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'
Here are the errors in Event Log: 9:25 AM Emulator: emulator: WARNING: UpdateCheck: Failure: Error
9:26 AM Gradle build failed in 1 m 15 s 453 ms
9:26 AM Emulator: emulator: WARNING: AsyncSocketServer.cpp:99: Error when accepting host connectionError message: Unknown error
9:26 AM Executing tasks: [:app:assembleDebug] in project C:\Users\Maryam\AndroidStudioProjects\Sign_Up
9:26 AM Gradle build failed in 18 s 154 ms
9:26 AM Build APK(s): Errors while building APK. You can find the errors in the 'Messages' view.
9:29 AM Gradle sync started with single-variant sync
9:30 AM Gradle sync failed: Could not find method implemantation() for arguments [com.android.support:cardview-v7:26.+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. (8 s 722 ms) Here is my Build Gradle File:
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:+'
}