For Android Studio 2.2.2
Yes, in library module, it can’t use the apply plugin: com.android.application
statement in the module definition, yes, use apply plugin: com.android.library
instead. (still in lib module)
But then you have to do the following:
- Expose the same SDK versions in Gradle files for both modules.
- Right click on your projects “app” module folder and click on -> open module settings
- Click on the “dependencies” tab
- Click on the + sign to add a new dependency and select “Module Dependency”
- Look for the library you need and add it.
Also while naming your lib module avoid capitals.