[Error Resolving] Manifest merger failed : 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.


I post about how to solve when I encounter the following error while developing an Android app.


Manifest merger failed : 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.


Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported`



Resolution

   -. If you go to the AndroidManifest.xml file, there is a part that defines activities.

     Add the exported attribute here.

     If it is not a special security activity, you can give it a value of true.

     Just enter the red square part in the screenshot below.




android exported

<activity

     android:name=".MainActivity"

     android:exported="true">


A subsequent build fixes the problem and the build works fine.

Comments

Popular posts from this blog

java.net.SocketException: socket failed: EPERM (Operation not permitted) solved in one shot.

How to fix Could not find com.android.tools.build:gradle error

Open multiple Android Studio projects