Issue
I had to reinstall Android Studio for some reason. After installing, I am not able to build my project, getting this error
Failed to find Build Tools revision 31.0.0
There's no warning or error showing in build.gradle file
I have tried changing compiledSdkVersion,buildToolsVersion and targetSdkVersion to 30
As you can see, if I change the version to 30, it is saying me to update to 31.
This is my project structure.
I have also tried Sync project with gradle files, Invalidate cashes, and restart, but no help. I don't know what to do now.
Solution
Problem fixed.
Previously the class path in my project level gradle was 4.2.2, it was not showing any warning though.
classpath "com.android.tools.build:gradle:4.2.2"
I had to replace it with
classpath 'com.android.tools.build:gradle:7.0.0'
And the project compiled successfully.
@SweetD3v's answer was helpful.
Answered By - Rupam Das
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.