'Importing new projects from GitHub changes Android Gradle Settings

I have an issue with Gradle in Android Studio. Every time I import a new project from GitHub there are lot of notifications from Android Studio to update many things and even though I cancel all of them few things get updated on it's own such as coding style and other things.

For example recently I imported a project and then worked on that project for few days but after few days when I tried opening my existing Android projects there are some unknown errors with Gradle, Kotlin Kapt and all things.

I want to know is there any easiest way to keep track of your default Android Studio settings and every time you import a project only than only settings for that project are changed and not for entire Android Studio



Solution 1:[1]

you should download the project offline and go to the build.gradle(project-level module) and update classpath dependency for example classpath 'com.android.tools.build:gradle:7.0.4' after this go to gradle -> wrapper ->gradle-wrapper and update distributionUrl for example distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip and finally you can open your project in Android Studio.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Faisal ur Rehman