Different Ways to Fix “Configuration with name ‘default’ not found” in Android Studio
Last Updated :
24 Mar, 2021
Whenever you try to import or clone a code from any version control system, there are chances that Android Studio throws the error:
"Error: Configuration with name 'default' not found".
There can be more reasons to face this error such as adding .jar files to your android project. So in this article, we are going to cover the topics: Why there is a need to fix this error and how to fix this error using six different ways.
Why There is a Need To Solve ‘Configuration with name ‘default’ not found’?
While importing the zip file into Android Studio, it shows the above error. When you try to build the project, Gradle sync fails. Some of the Gradle files probably cannot find a library. This error generally occurs due to the following reasons:
- When a module doesn’t have the build.gradle file,
- You’re trying to use a project that doesn’t have a “build.gradle” file.
The build.gradle file for each submodule needs to have the information on how to build itself and any custom Gradle command definitions. So, you need to make sure that each submodule in your project has its own build.gradle file. The name ‘default’ happens because of your project-level build.gradle is trying to build a project that doesn’t know how to build itself, thus it is given the name ‘default.’ We need to fix this error as due to this Gradle sync keeps failing and you cannot build your project.
How To Solve ‘Configuration with name ‘default’ not found’?
Method 1
Step 1: Open your app’s gradle file

Step 2: Look for the line : compile project(‘:android-ColorPickerPreference’) .

Step 3: Change this line to : compile fileTree(dir: ‘//you libraries location//’, include: [‘android-ColorPickerPreference’])

Method 2
Add your library folder to the root location of your project and copy all the library files there. For example, YourProject/library then try to sync it.
Method 3
If your project Library uses submodule management and if all submodules are not loaded properly, this will also cause the error:
Error:Configuration with name 'default' not found
To solve the problem simply execute the command: git submodule update –init

Method 4
You may have a git submodule problem. Try running:
gradle tasks –info (if you are Linux user) for a more detailed problem description.
For Windows just type: gradlew tasks –info

then wait for few seconds. After that, you should be able to see the “build successful” message on the terminal as shown below.

Method 5
Open your settings.gradle

You will see many includes “:app” included.

But if items under the project directory seem to be missing then, add the items that need to be included. If the included items are not required, delete its include statement. Try sync again.

Method 6
Try Renaming the Module. The root/settings.gradle in the root directory will not automatically modify the name. You need to manually rename the name to your modified name.
Similar Reads
Different Ways to Format Code in Android Studio
Code formatting is very important when you are building an Android application. This will help you to organize your code properly and to maintain your code to make it easily readable. Below is a list of purposes of having a standard coding format. Purposes of Having Coding Standards A coding standar
3 min read
Different Ways to Create aar File in Android Studio
Android Studio can be used to create an Android archive file (*.aar) that can contain classes and methods that make use of Android classes and related files. Like creating the Jar file, an Android project must be created first, then the Android library module can be created and added. The main diffe
3 min read
Different Ways to Increase Editor Font Size in Android Studio
Android Studio is the official IDE (Integrated Development Environment) for Android app development and it is based on JetBrainsâ IntelliJ IDEA software. Android Studio provides many excellent features that enhance productivity when building Android apps, such as: A blended environment where one can
2 min read
Different Ways to fix Cannot resolve symbol 'AppCompatActivity' in Android Studio
When you create a project and extends activity AppCompatActivity, sometimes you must have observed Android Studio throws an error that is: Cannot resolve symbol 'AppCompatActivity' and this error doesn't go away easily. In this article, we are going to cover topics: why there is a need to solve this
2 min read
Different Ways to fix "DELETE_FAILED_INTERNAL_ERROR" Error while Installing APK in Android Studio
In Android Studio when building a new APK or while installing an application from Android Studio. You will get to see errors as shown in the title such as "DELETE FAILED INTERNAL ERROR". This error is generally due to conflicts in the APK version while installing a new Android app. This is how the e
4 min read
Different Ways to Add Stacktrace or debug Option when Building Android Studio Project
While developing your favorite app, you might at some point of time arrived upon this strange error, :GfGapp:processDebugResources FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:processDebugResources'. * Try: Run with --stacktrace option to get the
2 min read
Different Ways to Fix "Android Studio Does not Show Layout Preview"
Have you ever faced the problem in the android studio that it is not showing the layout preview while you are constructing a layout for your project? If yes, then this article will help you to solve this problem. Below is the screenshot of the empty layout which is the problem that we have solved: M
3 min read
How to Change the Default Generated apk Name in Android Studio?
While developing any Android app using Android Studio we generate our APK file after creating our whole Android application. We use this .apk file to publish it to our Google Play console or on any other platform. When we are generating our .apk file for release apk. We always see our apk file name
6 min read
Different Ways to View Method Information in Android Studio
Easy access to documentation written in comments when hovered over the text is like a cherry on a cake. In Android Studio and other JetBrains editors, there is an option that you can enable to display function types and docs on mouse hover. But first, let's get familiar with what methods are in Andr
3 min read
Different Ways to fix "The APK file does not exist on disk" in Android Studio
Whenever we try to debug the application on Android Studio we encounter the error âThe APK file does not exist on diskâ in the Android Studio. The MainActivity Page throws the error as: The APK file /Users/MyApplicationName/app/build/outputs/apk/app-debug.apk does not exist on disk. So, In this arti
3 min read