Home > Software engineering >  Manifest merger failed : android:exported needs to be explicitly specified for element <activity#
Manifest merger failed : android:exported needs to be explicitly specified for element <activity#

Time:03-17

Merging Errors: Error: android:exported needs to be explicitly specified for element <activity#com.instabug.bug.view.reporting.ReportingContainerActivity>. 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

CodePudding user response:

In your manifest file(AndroidManifest.xml), add android:exported="true" inside your ReportingContainerActivity's activity tag.

CodePudding user response:

After the build has failed go to AndroidManifest.xml and in the bottom click merged manifest see which activities which have intent-filter but don't have exported=true attribute. Or you can just get the activities which are giving error.

Add these activities to your App manifest with android:exported="true" and app tools:node="merge" this will add exported attribute to the activities giving error. Example:

 <activity
            android:name="<activity which is giving error>"
            android:exported="true"
            tools:node="merge" />

You will have to do this once, you can remove this once the library developers update their libs.

  • Related