<manifest xmlns:dist="http://schemas.android.com/apk/distribution"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.poc.auth">
<!-- Note that we replace here our delivery from `on-demand` to `install-time` and put on the debug
folder so in tests this performs as a monolithic application and avoid non found
errors. Note also that this manifest need to be in `debug` folder rather
than `androidTest` folder. See https://stackoverflow.com/questions/26244998/androidmanifest-in-androidtest-directory-being-ignored-->
<dist:module
dist:instant="false"
dist:title="Feature Module Auth Test"
tools:node="replace">
<dist:delivery>
<dist:install-time />
</dist:delivery>
<dist:fusing dist:include="true" />
</dist:module>
</manifest>
1条答案
按热度按时间yzckvree1#
我通过在动态模块的
src/debug
文件夹中创建一个AndroidManifest.xml
并放置以下内容来解决动态模块中的插装测试问题:这将使应用程序在测试中作为单片
.apk
工作,这非常适合本地和 CI/CD 小型仪器测试。如果您需要在suggested here这样的 * 端到端 * 测试中测试交付本身,我不确定这是否会有影响,但是如果有影响,您仍然可以为您的 * 端到端 * 测试创建一个风格,该风格再次覆盖清单。