- When building to Android, the console displays the following messages:
OBSOLETE - Providing Android resources in Assets/Plugins/Android/res is deprecated, please move your resources to an AAR or an Android Library. See "AAR plug-ins and Android Libraries" section of the Manual for more details.
CommandInvokationFailure: Unable to merge android manifests stdout[ Warning: [Temp/StagingArea/AndroidManifest-main.xml:2, /UnityProject/Temp/StagingArea/android-libraries/unity-android-resources/AndroidManifest.xml:1] Main manifest has but library uses targetSdkVersion='26'
Unity does not support providing Android resources in Assets/Plugins/Android/res. When building to Android, Unity generates a manifest for resources inside plugins/android/res, and points to the highest installed SDK version by default.This is why the AndroidManifest.xml points to "targetSdkVersion=26", and why manifest merge issues occur.
Create an Android plug-in with those resource files placed inside. The plug-in should contain its own manifest file. You can create either an AAR plug-in or an Android Library Project for this purpose.
AAR plug-ins and Android Libraries
Is there a step by step process which can walk me and others facing this issue to follow? I have been stuck at a solid brick wall for the past week.
Any update on how to add "network_security_config.xml" in Unity 2021? We need a template how to create androidlib or aar with network_security_config.xml inside.
Please sign in to leave a comment.