Reputation: 881
I have added a dynamic feature to a project and it is giving me an AAPT
error when trying to run the instrumentation tests.
The project has 3 product flavors:
In the build.gradle
of the dynamic module, I have put the flavors and compiles everything correctly. But trying to run the instrumentation tests gives me this error:
<dynamic-feature-route>/build/intermediates/tmp/manifest/androidTest/development/debug/manifestMerger2359481887313534357.xml:7:5-9:19: AAPT: error: resource string/app_name (aka <dynamic-feature-package-name>.test:string/app_name) not found.
I've tried several things, but I don't find out the solution.
Upvotes: 1
Views: 478
Reputation: 881
The solution was actually very easy...
It has been as simple as overriding the app_name
in each flavor of the build.gradle
dynamic module.
productFlavors {
development {
resValue "string", "app_name", "Foo App Name·dev"
}
preproduction {
resValue "string", "app_name", "Foo App Name·pre"
}
production {
resValue "string", "app_name", "Foo App Name"
}
}
Upvotes: 1