Application is installing fine and the build is okay. But in the whole app I can see this error. It happened when I tried to upgrade the project from 4.2.2 to 7.2. But it failed and rolled back. I have done the following steps.
- clean the project.
- Rebuild the project.
- Sync with gradle files.
- Invalidate cache and restart.
- Moved the project to other dir and run it from there.
also I have read other answers about cannot resolving R. cannot resolve R
Here is my app project level gradle
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.google.gms:google-services:4.3.15'
// Add the Crashlytics Gradle plugin (be sure to add version
// 2.0.0 or later if you built your app with Android Studio 4.1).
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.5.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenCentral()
centre()
}
}