3

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.

android:exported="true" already been declared in my AndroidManifest.xml file but still I am receiving this error and I am unable to build the app in react-native

AndroidManifest.xml :

<manifest xmlns:android="http://schemas.android.com/apk/res/android"package="com.kims.doctors">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.NOTIFICATIONS"/>
<uses-permission android:name="android.permission.VIBRATE" />

<application android:networkSecurityConfig="@xml/network_security_config"
    android:usesCleartextTraffic="true"
  android:name=".MainApplication"
  android:label="@string/app_name"
  android:icon="@mipmap/ic_launcher"
  android:roundIcon="@mipmap/ic_launcher_round"
  android:allowBackup="false"
  android:theme="@style/AppTheme">
    <activity
        android:name=".SplashActivity"
        android:theme="@style/SplashTheme"
        android:label="@string/app_name"
        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:label="@string/app_name"
    android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
    android:launchMode="singleTask"
    android:windowSoftInputMode="adjustResize" 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="com.facebook.react.devsupport.DevSettingsActivity" android:exported="true" />
</application>

this is my androidManifest.xml code snippet, please help me to solve this error

  • Check your merged manifest, such as via the "Merged Manifest" sub-tab in Android Studio's manifest editor. A library may be contributing a component that is affected by this. – CommonsWare Sep 27 '21 at 15:48
  • 1
    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. doctors.app main manifest (this file) this is the log I found in Merged Manifest subtab – Jithendra Nath Sep 27 '21 at 17:46
  • I had same issue, try next: https://stackoverflow.com/questions/69329393/apps-targeting-android-12-and-higher-are-required-to-specify-an-explicit-value-f – Vadym Yaroshchuk Sep 28 '21 at 16:18

0 Answers0