Reproduction steps:
1. Open the attached “BugRepro” project
2. Click Edit > Project Settings… > Player > Settings for Android > Publishing Settings
3. Disable Custom Keystore
4. Click File > Build Settings… > Android > Build
Expected result: The project is successfully built
Actual result: Gradle fails with the error “Execution failed for task ':unityLibrary:processReleaseManifest'.”
Reproducible with: 2022.2.0b3, 2022.2.15f1
Couldn’t test with: 2020.3.47f1, 2021.3.22f1 (couldn’t test because of error “Assets/Oculus/Interaction/Editor/AutoWiring/UnityObjectAddedBroadcaster.cs(74,50): error CS0117: ‘SceneManager' does not contain a definition for ‘loadedSceneCount'“), 2022.2.0a1, 2022.2.0b2 (couldn’t fix compiler errors), 2023.1.0b12, 2023.2.0a10 (couldn’t test because build fails with error “Error building player because script class layout is incompatible between the editor and the player.”)
Reproducible on: Windows 10 Pro 22H2, Ubuntu 22.04
Note: Full error: “
FAILURE: Build failed with an exception.
Execution failed for task ':unityLibrary:processReleaseManifest'.
> A failure occurred while executing com.android.build.gradle.tasks.ProcessLibraryManifest$ProcessLibWorkAction
> Manifest merger failed : android:exported needs to be explicitly specified for element <activity#com.unity3d.player.UnityPlayerActivity>. 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.
“