[Android] Fix duplicate and missing namespace in UnityLibrary build.gradle. #36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes 2 issues regarding the
namespace
definitions in UnityLibrary.1 - duplicate namespace
The android exporter contains a section to add a
namespace
to thebuild.grade
file in Unitylibrary.flutter_embed_unity/example_unity_2022_3_project/Assets/FlutterEmbed/Editor/ProjectExporterAndroid.cs
Lines 94 to 105 in 2af5a0b
Exporting with Unity 2022.3.58 results in a duplicate namespace. But Unity 2022.3.21 does NOT.
Somewhere between 2022.3.31 and 2022.3.58 Unity updated to add their namespace, and this export doesn't check if it already exists.
2 - missing xrmanifest namespace
When you use Gradle 8 and a Unity version that does not trigger (1) , you get a namespace error for xrmanifest:
Solution
unityLibrary/build.gradle
andunityLibrary/xrmanifest.androidlib/build.gradle
.