What is the correct way to specify an Android library project to include its dependencies

后端 未结 1 1784
眼角桃花
眼角桃花 2021-01-13 16:23

In Android Studio I\'m trying to compile an Android application module which uses an Android library.
The library includes a jar file for Bugsense (included automaticall

相关标签:
1条回答
  • 2021-01-13 17:10

    It's the expected behavior. Only the repository declarations for the project whose configuration is currently resolved are taken into account, even when transitive dependencies are involved. Typically, repositories are declared inside the root project's allprojects { .. } or subprojects { ... } block, in which case this problem can never occur.

    PS: dependencies { .. } needs to go outside the android { ... } block.

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