Exchange of your own module for Android Studio projects

I am struggling poorly with the transition from Eclipse to Android Studio.

Basically, I understand that the Android Studio project is more like a workspace, and the module is more like a project ...

However, on the Android Studio start page, you can only create projects, since you can share a module (i.e. a project in eclipse terms) in projects?

Basically, I have several applications that use the shared library that I created, in Eclipse all I do is flag in the form of a library and just reference it in every project.

I do not know how to do this in Android Studio. Examples of creating modules, apparently, lead you to how to create a module for any real purpose, except how to use it in one application.

I first imported my library as a project into android studio, but that turned out to be pointless, thinking that it was because I want it to remain separate in my version control system.

Then I created a temporary module inside my application, but then it stores it in the project, and in other applications I can’t find a way to import the modules, so I really don’t understand what the module point is when it is built into the project and cannot be separated or bound elsewhere.

Thanks for any help.

+5
source share
1 answer

Consider the project name of the common-lib library

Open build.gradle projects you want to add the library to, add the following

 dependencies { compile project(':common-lib') } 

and gradle sync

+1
source

Source: https://habr.com/ru/post/1200342/


All Articles