THIS CONTENT DOWNLOAD SHORTLY

Objective

The main objective of this post is to help android developers import library project or module as dependency in Android Studio.

 

Introduction:

Android Studio is a next gen and fully featured IDE for android developer by Google in collaboration with intelliJ. It’s more advance and with better IntelliSense as well as lots of other features. It uses gradle and maven as project management tools so, for eclipse user it would be tough to use it. Due to gradle it becomes more flexible than older ADT.

This blog is written for those users who has knowledge about android app development.

This blog is for who wants to transfer themselves to android studio from eclipse environment. In android, developers need to use external library-project or module for project. But for eclipse user it would be tough to do it in android studio, as well as new project-libraries are being developed in android studio.

So, in this blog how to import library-project /module in android studio and how to use it, is shown in six simple steps.

 

Step 1 Create New Project in Android Studio

If you are new to Android Studio and don't know how to create a new project then you should checkout our other blog:

 

Step 2 Now open file menu and click on import module

file-menu

 

Step 3 Open Directory

Now click on browse file or use Shift + Enter 

source-directory

 

Step 4 Select Directory Module

Now select your library-project/module location from dialog, Here we are using appcompact_v7 library.

module-location

And now in project tab you can see your imported module 

imported-module

Still you can’t use this library/module as dependency for that it must be registered in build.gradle file

 

Step 5 Register Module

Register module in build.gradle: For that follow these simple seven steps

Open file menu and click on project structure 

project-structure

Now in Project Structure dialog box select app under module 

app-under-module

Now Click on Dependencies tab in project structure dialog 

project-structure-dialog

Click on + sign in right side corner 

right-side-corner

Select Module Dependency from list 

module-dependency

Select library/module that we have import from dialog box 

select-library-module

Click apply and Ok 

library-is-registered

Now library/module is registered in build.gradle

 

Step 6 Finally click on sync gradle button 

screenshot-29

Now library-project/module is registered and synced with gradle now you can use it.

I hope you found this blog helpful while importing Library-Project or Module as Dependency in Android Studio. Let me know if you have any questions or concerns regarding Android Studio, please put a comment here and we will get back to you ASAP.

Got an Idea of Android App Development? What are you still waiting for? Contact us now and see the Idea live soon. Our company has been named as one of the best Android App Development Company in India.

I am dedicated and very enthusiastic Android developer. I love to develop unique and creative apps and also like to learn new programing languages and technology.