Ankur Jain
Ankur Jain

Reputation: 35

Equivalent of "android.library=true" in Android Studio

I am new to Android Studio and IntelliJ Idea, as a previous Eclipse user.

The module I'd like to add as a dependency to another module doesn't show up in the list of dependencies available to add to the project.

In Eclipse, inserting android.library=true in project.properties will enable it to be added as a dependency. How does one make it show up in the available dependency module list in Android Studio?

Thanks.

Upvotes: 0

Views: 822

Answers (2)

An Le Van
An Le Van

Reputation: 44

In build.gradle file:

Change apply plugin: 'android' to apply plugin: 'android-library'

http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Library-projects

Upvotes: 0

Gabriele Mariotti
Gabriele Mariotti

Reputation: 364291

The @An answer is correct.

However this syntax is old. You should use this inside your build.gradle file.

apply plugin: 'com.android.library'

Also you should check if in settings.gradle there is the library module.

include ':app' , ':library' //,':library2'.....

Upvotes: 2

Related Questions