sceneview-android
sceneview-android copied to clipboard
Duplicate classes conflict with TensorFlow due to flatbuffers
In our project we use TensorFlowLite that depend on com.google.ar.flatbuffers via Gradle.
I see that SceneView uses a copy-pasted flatbuffers version with some properties exposed from private to protected.
Building SceneView and Tensor is not possible due to Duplicate classes issue that I could not resolve from our project side.
I've managed to resolve it easily inside the code of SceneView just by using AndroidStudio's refactor tool to move flatbuffers contents from com.google to ios.github.sceneview. @ThomasGorisse Sorry to bother you once more, but I am not quite sure if it is a reasonable solution as I do not know what was the original idea behind copying the flatbuffers to inside of the project. If my approach is OK, I can open a merge request with the refactoring result.
Thanks @Michael-Kr for the feedback.
This part is unfortunalty still needed until ViewNode, PlaneRenderer and CollisionSystem are moved to Sceneview implementation.
Could you please create a PR with what you made?
Maybe the cleanest way is to move the content of com/google/ar/sceneform to io/github/sceneview/sceneform and also add the com/google/flatbuffers folder in it.
I can publish a release quickly after that.
In our project we use TensorFlowLite that depend on
com.google.ar.flatbuffersvia Gradle. I see that SceneView uses a copy-pastedflatbuffersversion with some properties exposed from private to protected. Building SceneView and Tensor is not possible due to Duplicate classes issue that I could not resolve from our project side.I've managed to resolve it easily inside the code of SceneView just by using AndroidStudio's refactor tool to move
flatbufferscontents fromcom.googletoios.github.sceneview. @ThomasGorisse Sorry to bother you once more, but I am not quite sure if it is a reasonable solution as I do not know what was the original idea behind copying theflatbuffersto inside of the project. If my approach is OK, I can open a merge request with the refactoring result.
Would you mind providing information on how you did this? I'm struggling with the same issue but don't know how the refactor tool works.
@Caulli you can check MR that I opened for this issue: https://github.com/SceneView/sceneview-android/pull/377
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.
Our team also ran into this issue. In our project com.google.flatbuffers.* is already used over another dependency and now we got the same checkDebugDuplicateClasses build problem. We want to use your library, because it helps a lot. Thx you in advance.
I have a few questions regarding this issue:
-
@ThomasGorisse could you pls explain what was the reason to copy the
flatbufferscode in the first place instead of using a dependency to their library? Because this would be the usual way, right? -
What was the reason this PR was closed: https://github.com/SceneView/sceneview-android/pull/377 ? Because if you don't want to add
flatbuffersas a dependency you should at least use your own package id for your code in the sceneview library, right?