I have a problem with a manifest file, error message:
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.
My AndroidManifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myapp">
<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.MyTheme">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:exported="true"
android:name=".Activities.SplashScreenActivity"
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
</activity>
</application>
</manifest>
This post describes a solution but it doesn't work or I made something wrong. Maybe anyone has a similar problem, please let me know how to resolve that.
AndroidManifest.xml
.<activity>
that includes an <intent-filter>
tag is missing the android:exported
attributeGo to Declaration
then add android:exported
attribute to the activity tagHope it will work. It works for me.