Issue with Unity3D: "Found plugins with same names, and ."
*** IMPORTANT ***
Following contains my approach for fixing duplicated plugins error in Unity3D. I have no idea if it is a correct way to do this, but it worked in my case.
BACK UP YOUR PROJECT BEFORE TRYING THIS APPROACH!
*** IMPORTANT ***
So. let's start.
Game conversion from Unity 2018.2.13f1 to 2019.2.0f1 was running smoothly with no errors. But when I tried to compile my little game for Android, I got bit strange error message:
"Found plugins with same name, and . Delete the one of the duplicate plugins"
(please note the empty spaces around 'and' word).
I have seen something like this earlier when struggling with different plugins, but duplicated plugins names have been reported clearly in the error message. This time was different and I did not have any idea what to look for. I tried search and destroy some plugins from caches but no success. I also tried to delete all files under "PlayerDataCache", "ShaderCache" and "FacebookSDK" directories, just to see what happens. But no success.
I decided to return to the starting point by removing converted project and copying original project from backup to get a fresh start. After that I went under project "Library" directory and removed following subdirectories:
- FacebookSDK (I have no idea why it was there, since I had not used any FB stuff in project)
- il2cpp_android_* directories
After removing these directories I did 2018.2.13f1 to 2019.2.0f1 conversion again and started Android compilation with Android App Bundle build enabled. This time everything was working fine and I got AAB compiled successfully! So it seems that there were something really wrong in caches.
And yes, I have had similar issue with two projects I have converted from Unity 2018 to 2019: First one had old Data Privacy Plug-In from Asset Store so I suspected it somehow conflicted with the latest Analytics DataPrivacy API (comes with Unity 2019). But second project had no Data Privacy plugin installed, so I guess it can't be the root cause for duplicate plugin issue.
And as stated in the beginning, I have no idea if my approach is acceptable in all cases. For me it worked, but I don't take any responsibility if you break your project with this approach. SO, MAKE BACKUP BEFORE DOING ANYTHING ELSE!