Hey!
So I noticed that when I export a build to a gradle project and import it in android studio I get this error:
Error:Execution failed for task ‘:processReleaseResources’.
Error: A library uses the same package as this project: com.youdagames.gop3multiplayer
I fixed it and noticed that the unity-android-resources lib that the unity build process added now includes a manifest with the same package name as my project. In unity 5.5 this manifest had the package name “com.youdagames.gop3multiplayer.resources”… I have to manually change it everytime I want to build? is this intentional??
This is a bug. Please submit a report - we’ll fix it ASAP.
For anyone who wants to know… to fix it… add “.resources” to the unity-android-resources manifest package name. hope this get fixes faster then my other bug xD took 4 months
I already pushed the fix to the development branch, so it will need just a week or so to appear in a patch release 
1 Like
I am using gradle, how come i didn’t see this? or does it only happen when importing into Android studio ?
@liortal if you’re not using Assets/Plugins/Android/res folder (which I hope you don’t) - you’re not affected 
Thanks Yury! Some plugins use the “Assets/Plugins/Android/res” folder, can you explain to me why you hope we dont use the folder??
Sure - please read the warning Unity prints when you are using this folder 
It’s a bad practice because it may cause resource conflicts with the other plugins.
Hey, Been 3 patches now… its not fixed yet. Its not that big of a deal for us to change it everytime but I thought you said you fixed it… so maybe not fixed yet? Just checking if something might have gone wrong
https://fogbugz.unity3d.com/default.asp?899286_hk9sudii94iru7ps still open.
@Apollo-Meijer your bug report even wasn’t processed by the QAs because there is no repro project attached.
Also, it should be fixed in 5.6.0p3, according to my notes.
I must have missed it in the patch notes. Thanks!
1 Like
I am having similar issue. I am using unity 5.6 gradle system. I relocated my “Assets/Plugins/Android/res” folder to “Assets/Plugins/Android/android-resources/” but the unity doesn’t export this folder in the exported android studio project. I also added some jars in the “Assets/Plugins/Android/libs” folder that are not exported in the project. Any help regarding this ?

This bug still exists even in 5.6.2p4 build. =( But I use just Default Build System instead of Gradle. While converting to dex I’m getting an error of too many refferenses and have a package with name “com.mycompany.myapp.resources” in addition to normal package “com.mycompany.myapp” with same refferenses count in both.
We’re using this folder to localize our app name, is there a better way to do this then?
@stevencoull ideally, you should provide your resources (even the localization strings) in a .aar file. It’s an archive so could be even updated automatically. You could also create an Android Library (we do generate it from res/ folder when building for you).
However, in your case, if providing resources in res/ works for you, - feel free to do it until we drop support for it completely.
@Yury-Habets thanks for the reply. We’re only using res/ for our localization strings, so it makes sense to move over to .aar before it’s unsupported. I can’t find any documentation on this so I hope you don’t mind the silly questions, but if we stick our strings in a .aar file do we have to use the package name as our app? Our app recently hit the 65k limit so I tried exporting to Gradle, but using the res/ folder seems to be causing us some issues as I mentioned here:
If we use a .aar, will the Gradle build still pick up the localized strings?
@stevencoull those are valid questions. For internal build system, the name of the package instead of res/ folder can be whatever you like it. Gradle is more strict, so you have to define resources within the plugin/package you are accessing it. Gradle should resolve your 64k dex limit issue.
So, for a valid solution to your tasks, you would have to spend some time. However, we are not going to drop res/ folder support in the foreseeable future - it’s not even on the roadmap, so you could easily continue using it if a proper fix is taking too much of your time. But getting prepared for Gradle is definitely the way to go.
@Yury-Habets In Unity 2017.1.2 I have almost the same problem when building apk with Gradle
> Duplicate files copied in APK AndroidManifest.xml
File1: I:\PROJECTS\Game\Temp\gradleOut\build\intermediates\res\resources-release.ap_
File2: I:\PROJECTS\Game\Temp\gradleOut\build\intermediates\transforms\proguard\release\jars\3\1f\main.jar
It is caused by UTNotifications Plugin.
According to Unity Manual → Gradle troubleshooting, It should be Manifest merge issue…but it is not.
I tried all possible merging scenarios. I tried renaming: Assets\Plugins\Android\UTNotificationsRes folder to only “res”. Still no luck.
The only thing that works is to exclude AndroidManifest.xml from the gradle…but then the generated apk cannot be installed.
Please help
Full error message from the console would be most helpful.