PlayEveryWare / eos_plugin_for_unity

Repository for PlayEveryWare's EOS Plugin for Unity, bringing the functionality of Epic Online Services to the Unity Game Engine.
https://eospluginforunity.playeveryware.com
292 stars 54 forks source link

Duplicate Android Plugin Error #194

Closed AndrewKahr closed 1 year ago

AndrewKahr commented 1 year ago

Describe the bug When trying to build an Android APK, it throws the error Found plugins with same names, Packages/com.playeveryware.eos/Runtime/Android/eos-sdk.aar and Assets/Plugins/Android/eos-sdk.aar. Delete the one of the duplicate plugins

To Reproduce Steps to reproduce the behavior:

  1. Create a upm package of the latest develop branch
  2. Import samples
  3. Switch to android
  4. Attempt the build

Expected behavior Build succeeds

Desktop (please complete the following information):

andrew-hirata-playeveryware commented 1 year ago

Hello AndrewKahr, Just to double check, do you have an extra version of the eos-sdk.aar on disk? If you delete the one under Assets/Pluins/Android/eos-sdk.arr, does the issue still occur?

AndrewKahr commented 1 year ago

I've tried deleting the entire plugins folder but the plugin will regenerate the folder and throw the error.

arthur740212 commented 1 year ago

Thanks for the feedback, will take a look at this as I think I have an idea what might cause this to happen.

arthur740212 commented 1 year ago

Hi, we weren't able to reproduce the issue you were facing, were you using and importing the package on an empty project? Additionally, good news is that there was an update related to the package a couple of days ago. Would be nice to give it a try, and feel free to report the new problems you find.

AndrewKahr commented 1 year ago

@arthur740212 I've been using a blank project for testing, but I just gave it another try with another fresh project and a fresh build of the latest develop branch but I'm still running into the issue. Note that I am running Unity 2022.2.X and not 2021.3.X, not sure if those have different behaviors, although for an error like this I would expect it to happen regardless of unity version.

arthur740212 commented 1 year ago

While building for android, it will copy a new aar from the folder according to whether the user decides to use static or dynamic linking. It seems that an extra aar is packed into the runtime folder in the package, even though it seemed to work on our builds. Based on my assumption, I pushed a fix on the development branch, please give it a try and let us know if further issues occur.

AndrewKahr commented 1 year ago

Just got a chance to test it and the fix seems to work, just an extra meta file for the aar that was left over in the package description that Unity throws a warning about.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 7 days with no activity.

arthur740212 commented 1 year ago

Thanks for the fix and the report. The meta file would be needed in a way, but generally lingering meta files is unpleasant. I have pushed an update to copy the needed library and its corresponding meta file during OnPreprocessBuild. Together with your fix there should be no more unwanted meta files, and they will exist when we need them.