'After cleaning gradle, androidx-test.core module throws merged-manifest errors
In a react-native project, ive recently updated to v66.4 from v63.2
after some dependency conflict troubleshooting, i ultimately get a merged manifest error, that indicates suggestions for 3 locations
initially this was 4 locations
i added android:exported="true"
to the main projects manifest xml
now 1/4 issues resolved
3 remain, and theyre all the same issue
they indicate a problem with the manifest file for the test:core:1.3.0
ok, so i add the android:exported="true"
flag to each of the activities in that manifest
i then build the debug apk, it compiles successfully, installs, and runs
but if i run ./gradlew clean
and then try to build the apk again, it gives me the same error with the 3 activities from test:core:1.3.0
heres an example of the errors:
how can i resolve this permanently?
Solution 1:[1]
Head over to your AndroidManifest.xml file for the main flavour. Go to the merged Manifest tab
And take a look at your merged manifest there and see what is causing problem. If I'm not mistaken you can override some of other manifests properties by specifying the correct one in main manifest since they have priority over those from 3rd party libraries.
Fot your case it's probably adding android:exported="true"
for the activities that have intent filters specified inside them.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Jakub Adamczyk |