# Getting Started with a library project in Android Studio So we're working on creating Android Material Awesome, a library which will hopefully incorperate the benefits of Material Design, Twitter's Bootstrap, and FontAwesome. What we really wanted is a **project other people can easily include into their projects using gradle dependencies**. These are the steps we took to get started in Android Studio (version 1.1). ## Create Projects The first thing we needed to do was to create **two** new projects, with all the default settings (Blank Activity etc). One for our sample app, and one for our library. We added both of ours into the same GitHub repo, however you can save them wherever you like. ## Fix Up Library Project 1. Rename module in Android Studio 2. Rename folder in Finder / File Explorer 3. drag build.gradle into Android Studio 4. Synchronise Initially we'll focus on our library project. Annoyingly Android Studio automatically creates you a module called `app`. Modules really should be uniquely named, so you'll need to right click on the module name, click `refactor` and rename to something useful. We called ours `awesomematerial`. Unfortunately, this doesn't fully rename the root folder. So using finder or file explorer, you need to navigate to the module folder. Rename it to whatever you named it e.g. `awesomematerial`. This'll break your project! To fix it, you need to go back to Android Studio, and open the build.gradle for the module. It'll have a little warning at the top asking you to add it to the project. Click this and wait for gradle to synchronise again! All your files should magically reappear again! ![Imgur](http://i.imgur.com/XfkXOU8.png) > Drag your build.gradle file back into Android Studio and click the yellow/gold banner at the top to add to your project. All your files should magically reappear again! 5. Whilst you still have your `build.gradle` file open, you'll need to change the first line : `apply plugin: 'com.android.application'` to say: `apply plugin: 'com.android.library'` 6. You'll also need to remove `applicationId` in `defaultConfig` before synchronising again. ![Imgur](http://i.imgur.com/UEucq9C.png) > The end library build.gradle file ## Add Library project into useful app ## Conclusion Now you can create all the library projects you want to and use them in any of your other apps! We'll probably write another post depending on how hard it is to publish our library into bintray ( https://bintray.com/howbintrayworks )