How to reference without copying a library project on Android Studio?

前端 未结 1 1857
囚心锁ツ
囚心锁ツ 2020-12-06 02:45

Yes, everywhere I can learn how to make a module from a project that will copy the library project. But that\'s no good, since a change in the library project would have to

相关标签:
1条回答
  • 2020-12-06 03:27

    Got it: In your project, go in settings.gradle and declare something like this: include ':LibReferenceName' project(':LibReferenceName').projectDir = new File(settingsDir, '../relativePath/toThe/libraryModule/fromTheProject')

    And at the modules that requires the library, include something like this in the build.gradle of it: compile project(path: ':LibReferenceName')

    You can also not use settingsDir and just put the absolute path of the project.

    0 讨论(0)
提交回复
热议问题