Issue
I am having problems of: Cannot resolve android.support.constraint.ConstraintLayout
I added the dependency on androidx.constraintlayout:constraintlayout
You can check that all files have been added to ensure this issue is resolved. The problem is, the problem remains.



First gradle.build:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.3"
classpath 'com.google.gms:google-services:3.0.0'
classpath "com.android.support.constraint:constraint-layout:1.0.2"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Second gradle.build:
```dependencies {
implementation "androidx.constraintlayout:constraintlayout:2.0.4"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.firebase:firebase-auth:21.0.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
//firebase auth
implementation 'com.google.firebase:firebase-core:16.0.5'
//firebase database
implementation 'com.google.firebase:firebase-database:16.0.4'
implementation "androidx.constraintlayout:constraintlayout:2.0.4"
// To use constraintlayout in compose
implementation "androidx.constraintlayout:constraintlayout-compose:1.0.0-alpha07"
}
apply plugin: 'com.google.gms.google-services'```
Solution
delete line no.25 from your build.gradle(module: ...) and add this line:
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
Answered By - Raj
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.