我有2个模块,模块A和模块B。模块B依赖于模块A,模块A通过使用api配置将依赖库共享给模块B。在设置测试环境时,在模块A内,我还使用testApi和androidTestApi使用共享测试库制作模块B。但是,在运行gradlesync之后,我收到警告消息:WARNING:Configuration'testApi'isobsoleteandhasbeenreplacedwith'testImplementation'。阅读提供的link它说其他模块不能依赖androidTest,如果你使用androidTestApi配置,你会收到以下警告。因此,我必须在示例中的模块B中定义测试库以跳