Reputation: 465
The problem might be similar or looks duplicated but it doesn't. I Tried every possible solution on Stackoverflow and YouTube but I couldn't solve the issue with my project. I have already released the app to Google Play Store as well. but Now facing this problem.
Error:
Your project may be using a third-party plugin that is not compatible with the other
plugins in the project or the version of Gradle requested by the project
The things I have tried:
I removed all the Gradle files and downloaded them again.
I compare all the libs and repositories with my other projects which are working with no issue. (but have not solved this project's problem).
I had recently added a module to add Native ads on this app and removed that too. (Not had any positive impact).
Several times I restarted the project and rebuilt the project. (result: nothing) I tried anything I could. the problem still exists.
Upvotes: 5
Views: 9717
Reputation: 949
In my case it was a compatibility problem between AGP (Android Gradle Plugin) and Gradle version:
Wrong config: AGP: 8.4.0 Gradle: 8.7
Good config: AGP: 8.4.0 Gradle: 8.6
All the answers helped, thanks for sharing!
Upvotes: 0
Reputation: 11
I just added below:
Build.gradle [Project] classpath 'com.android.tools.build:gradle:7.0.4'
Gradle.wrapper.properties distributionUrl=https://services.gradle.org/distributions/gradle-7.5.1-bin.zip
Upvotes: 1
Reputation: 335
I had. the same problem when I updated an old project in order to have new libraries and stuff, then started to appeared that problem. In my case I fixed this by cheking around the project and update version libraries, for example:
com.android.tools.build:gradle
org.jetbrains.kotlin:kotlin-gradle-plugin
com.google.dagger:hilt-android-gradle-plugin
And also I updated the hilt version
And that's it, it works again properly
Upvotes: 1
Reputation: 149
In my case, the Hilt version of the dependency was different from the Hilt plugin version.
Upvotes: 3
Reputation: 385
I experienced the same thing after I tried several things, the result is still the same.
It turned out that I had to update the version of the Firebase Performance library.
com.google.firebase:perf-plugin:1.3.5 to version 1.4.2
Upvotes: 1
Reputation: 47
I was facing the same issue. I just changed the version of these two lines. Replace these two lines with yours and sync the project.
Build.gradle (Project)
Gradle.wrapper.properties
I am using:
Android Studio Dolphin | 2021.3.1 Patch 1 Build #AI-213.7172.25.2113.9123335, built on September 30, 2022
Upvotes: 1