Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Manifest merger failed with multiple errors, see logs even after setting export in all components

I am getting below error while building apk. It is running properly on android device but apk is not build. I have set android:exported="false" in all activity, receiver and services.

Task :app:processDebugAndroidTestManifest FAILED
[androidx.test.espresso:espresso-core:3.2.0] /home/bansal/.gradle/caches/transforms-2/files-2.1/a88c494942c30cb858ca2f4a16161a0e/espresso-core-3.2.0/AndroidManifest.xml Warning:
Package name ‘androidx.test.espresso’ used in: androidx.test.espresso:espresso-core:3.2.0, androidx.test.espresso:espresso-idling-resource:3.2.0.
/home/bansal/Documents/Buyer/bharatcall-android/app/build/intermediates/tmp/manifest/androidTest/debug/manifestMerger12251506600435692045.xml Error:
Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
/home/bansal/Documents/Buyer/bharatcall-android/app/build/intermediates/tmp/manifest/androidTest/debug/manifestMerger12251506600435692045.xml Error:
Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
/home/bansal/Documents/Buyer/bharatcall-android/app/build/intermediates/tmp/manifest/androidTest/debug/manifestMerger12251506600435692045.xml Error:
Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

you might set up exported in all YOUR components, but does all your dependencies do the same? open your manifest and below it you have "merged manifest" tab – in there you will see your manifest entries + all needed by dependencies, all merged into one manifest file (e.g. some lib may provide own Activity or Service, which also needs to be included in manifest, these may not have exported tags)

your problematic dependency is androidx.test.espresso according to posted error – you are using 3.2, newest one is 3.4. update dependency version, lib creators should fix that on their side already. if not – afaik you can’t do anything besides manually importing sources, adding missing XML attributes and importing this modified lib instead of "official" one. or by "pinging" owner for do so in official repo… 🙂

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading