Add application module dependency into another application module in Android Studio with Gradle

和自甴很熟 提交于 2019-12-12 07:56:15

问题


Is it possible to have 2 applications modules (with apply plugin: 'com.android.application' at the head of their gradle file) and one having a dependency over another?

So module A would have a dependency to module B and both would be applications.

dependencies {
    ...
    compile project(':moduleB')
}

I easily managed to add this dependency and no errors/warnings comes out but I still do not have access to source files inside moduleB. Android Stduio still suggest me to "add dependency to moduleB" and when I do it just re-syncing gradle and nothing happen.

I tried to include a dependency over a library module and this is working fine. Can't we add dependency between two (more more) applications modules?

来源:https://stackoverflow.com/questions/41854373/add-application-module-dependency-into-another-application-module-in-android-stu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!