Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot run Espresso with dynamicFeatures

When I am trying to run instrumented unit tests, I have a Manifest merging issue with Dynamic Features enabled.

I tried adding the modules as "androidTestImplementation project" but since they are "features" not "modules" it does not work. Anyway, I feel that this is a step too late because adding Dynamic Features already fails at this point. This is the Manifest merging issue:

insertion/build/intermediates/tmp/manifest/androidTest/debug/manifestMerger.xml  
Android resource linking failed 

build.gradle

    android {
    ...
    dynamicFeatures = [":feature1", ":feature2"]
    }

Did someone else had the same issue?

like image 944
Serj Avatar asked Feb 18 '26 00:02

Serj


1 Answers

I fixed it by adding app dependency also for androidTest in my dynamic feature module

implementation project(':app')
androidTestImplementation project(':app')
like image 178
lilienberg Avatar answered Feb 20 '26 13:02

lilienberg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!