且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Android Studio Gradle 不使用传递依赖项

更新时间:2022-12-13 13:31:25

这是因为您将传递依赖声明为 implementation.使用 api 而不是 implementation 更改:

It is because you declared the transitive dependency as implementation. Use api instead of implementation change:

implementation 'com.google.code.gson:gson:2.8.2'

到:

api 'com.google.code.gson:gson:2.8.2'

可以在这里找到您应该在库中声明传递依赖的原因