I have an Android Studio project with an app module.
Currently, I am writing another module that should use the first one.
Can I have the first module (which is an app module) be used by the second one as a library?
you have to do like below
In your 1st app module gradle
you have to add your second module implementation.
implementation project(':your_second_module_name')
Also you have to update one line in your setting.gradle
include ':app', ':your_second_module_name'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.