After updating 'com.android.tools.build:gradle' from version 4.1.3 to 4.2.0, I started to get an error that 'manifestPlaceholders' are no longer merged into the manifest when running unit tests. Everything works fine when I run the app. It just fails when running tests.
defaultConfig {
(...)
manifestPlaceholders = [
myPlaceholder1: "some_value_1",
myPlaceholder2: "some_value_2"
]
}
Any unit test in the "test" folder now fails with this message:
> Task :myLib:processDebugUnitTestManifest FAILED
/myProject/source/android/myProject/build/intermediates/tmp/manifest/test/debug/manifestMerger684952061703372993.xml Error:
Attribute attribute1 at manifestMerger684952061703372993.xml requires a placeholder substitution but no value for <myPlaceholder1> is provided.
/myProject/source/android/myProject/build/intermediates/tmp/manifest/test/debug/manifestMerger684952061703372993.xml Error:
Attribute attribute2 at manifestMerger684952061703372993.xml requires a placeholder substitution but no value for <myPlaceholder2> is provided.
I had to downgrade again to version 4.1.3. Anyone has any solution for this?