Follow

Providing Android resources in Assets/Plugins/Android/res is deprecated

Symptoms

  • 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' 
    

Cause

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.

 

Resolution

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. 

More Information

AAR plug-ins and Android Libraries

https://forum.unity.com/threads/where-unity-android-resources-androidmanifest-xml-is-came-from.506836/

https://forum.unity.com/threads/obsolete-providing-android-resources-in-assets-plugins-android-res-is-deprecated.315889/

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.