The new kid around the block is Android Studio. Its the new official IDE for Android development. Its a IntelliJ IDEA based IDE. Its a very flexible sort of an IDE, like most of the other java IDE’s. But since its a new development environment most of us don’t know how to do the most basic things in Android Studio. For example how to add a library in your project. As till now we have been working on Eclipse IDE.
How to import a library project in Android Studio?
In this short tutorial I would show you how to import a library project in Android Studio v126.96.36.199. The steps to do so are:
- Goto File -> New -> Import Module.
- Source Directory -> Browse the project path.
- Specify the Module Name – it is used for internal project reference.
- Let Android Studio build the project.
- Open build.gradle (Module:app) file.
- Add the following line with your module name in place of “Volley” in the dependencies block:
- It should look something like this:
- After this Android Studio would start saying “gradle files have changed since last project sync”, press the “sync now” link to start a sync.
- That’s all you need to do.
This is how you add a library project to an Android app project in Android Studio. Now that you have learned how to add a library to your android app, Happy Coding. Don’t forget to like our Facebook and Google+ page for more updates like these.
Born in New Delhi, India. A software engineer by profession, an android enthusiast and an evangelist. My motive here is to create a group of skilled developers, who can develop something new and good. Reason being programming is my passion, and also it feels good to make a device do something you want. In a very short span of time professionally I have worked with many tech firms. As of now too, I am employed as a senior engineer in a leading tech company. In total I may have worked on more than 20 projects professionally, and whenever I get spare time I share my thoughts here at Truiton.