Skip to content

Fix Android build: missing System.IO and Gradle namespace conflict - #586

Merged
achimmihca merged 2 commits into
UltraStar-Deluxe:masterfrom
faelcorreia:fix/android-build-all
Oct 21, 2026
Merged

achimmihca merged 2 commits into
UltraStar-Deluxe:masterfrom
faelcorreia:fix/android-build-all

Conversation

@faelcorreia

Copy link
Copy Markdown
Contributor

Hi!

I'm compiling UltraStar Play 1.7.1 for Android so I can play it on my S24, which
I've dedicated as a gaming station, and take advantage of the improvements in
this version.

Full disclosure: the rest of this text was generated by AI, but I actually tested
the changes myself and they work perfectly, so I endorse them.

1. DefaultSettingsFactory: missing System.IO

The Android-only code that creates the internal song folder uses Directory.Exists
and Directory.CreateDirectory without importing System.IO, so the Android build
fails with CS0103. This was already fixed in cb7e755, but the fix was lost in
the Melody Mania reintegration (1b39a5d), so this restores it.

2. AndroidManifest namespace conflict in the yasirkula plugins

ingamedebugconsole and androidruntimepermissions both use the com.yasirkula.unity
Android namespace. Gradle 9 / AGP 9 rejects this with:

Namespace 'com.yasirkula.unity' is used in multiple modules and/or libraries

which breaks the Android build. I upgraded them to the versions already used by
the companion app in 1b4cbcb:

  • androidruntimepermissions v1.3.1
  • ingamedebugconsole v1.9.0

The permission API changed in that version, so LoadingSceneControl now uses
CheckPermission (bool) and RequestPermissionAsync.

Third issue (separate PR)

In IL2CPP player builds the app crashes on startup because the visualelementevents
package still generates a HierarchyEvent callback with the old two-parameter
signature, while Unity 6.5 now passes an additionalContext argument. I opened a PR
in the package repo: achimmihca/Unity-VisualElementEvents#1.

The build succeeds with the changes in this PR. Once the package PR is merged I'll
bump the dependency in the manifest so the app also starts correctly.

Thanks!

faelcorreia and others added 2 commits October 19, 2026 02:37
The Android-only code that creates the internal song folder used
Directory without importing System.IO, which fails to compile when
building for Android (CS0103).

This restores the fix from cb7e755 that was lost during the Melody
Mania reintegration (1b39a5d).

Co-Authored-By: Claude Code <noreply@anthropic.com>
… conflict

ingamedebugconsole and androidruntimepermissions both use the
com.yasirkula.unity Android namespace. Gradle 9 / AGP 9 rejects this
with "Namespace ... is used in multiple modules and/or libraries",
which breaks the Android build.

Upgrade to the versions already used by the companion app (1b4cbcb):
- androidruntimepermissions v1.3.1
- ingamedebugconsole v1.9.0

Adapt LoadingSceneControl to the new permission API: CheckPermission
now returns bool and RequestPermission was replaced by
RequestPermissionAsync.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@achimmihca

Copy link
Copy Markdown
Collaborator

Hi, your findings are correct.
I added review remarks in the other PR.

Thank you!

@achimmihca
achimmihca merged commit a4aaa0b into UltraStar-Deluxe:master Oct 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants