This question might have been answered somewhere but couldn\'t find the appropriate one.
I want to know how can I create a common utility library project in Android Stud
Simplest way to do this :
Right click on your opened project in Android Studio and select New > Module
In the left Pane choose Android Library and click on next.
Enter all details, untick Create Activity, Theme and all if not required.
Choose API level same as your project and Next, Next, Next .
Now you will see an another directory inside your project, build.gradle
for library will be automatically configured for you.
If your module/library name is "mylibrary",
include ':mylibrary'
will be automatically added in settings.gradle file inside root directory of your project.
Now open your main module and insert this line in dependency block :
compile project(':mylibrary')
If you want to use same library in other projects, you have to copy the library module to that particular project using File Explore and have to configure settings.gradle and main module's build.gradle manually.