Manifest merger failed : android:exported needs to be explicitly specified for . 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.
There are no <services
in my app's AndroidManifest.xml
file, I also looked for each AndroidManifest.xml
file and they also don't have any <service
element, so why am I getting this error?
There are no errors in my merged manifest tab, however, the first manifest has two <receiver
and I've already added android:exported
property manually in them.
In app
-> src
-> main
-> AndroidManifest.xml
you need to explicitly add the Tag of android:exported="true"
in each <Activity>
under <Application>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Eynetic">
<activity android:name=".Splash_Screen"
android:theme="@style/SplashTheme"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MainActivity"
android:theme="@style/MainTheme"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
See the Activity Tag in the code...
<activity android:name=".Splash_Screen"
android:theme="@style/SplashTheme"
android:exported="true">
Currently i am doing it with each activity as that was the error given by Android studio but maybe there is a better way to add it only once somewhere in the code.
Try adding android:exported = false
pr android:exported = true
in your own manifest file and compile the code. I hope this should solve you issue. As adding manually in notification will not work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With