Bundle libveldrid-spirv.so into Android APK via explicit AndroidNativeLibrary - #211
Merged
Merged
Conversation
…eLibrary Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/d595c1fe-8425-4816-9bda-1da5c42cefbe Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
winnerspiros
April 19, 2026 19:54
View session
There was a problem hiding this comment.
Pull request overview
Bundles libveldrid-spirv.so into the net10.0-android APK to prevent startup crashes caused by ppy.Veldrid.SPIRV relying on legacy build/MonoAndroid10 targets that are not imported by modern .NET for Android.
Changes:
- Add an explicit
PackageReferencetoppy.Veldrid.SPIRVwithGeneratePathProperty="true"and excluded build targets. - Include
libveldrid-spirv.soin the APK viaAndroidNativeLibraryusing$(Pkgppy_Veldrid_SPIRV). - Extend
ValidateFrameworkNativeLibrariesto fail the build early iflibveldrid-spirv.sois missing.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
ppy.Veldrid.SPIRVships its Android native library viabuild/MonoAndroid10/Veldrid.SPIRV.targets.net10.0-androiddoes not importMonoAndroid10build targets — the old Xamarin TFM is not in the NuGet TFM compatibility fallback chain. Result:libveldrid-spirv.sosilently drops out of the APK →DllNotFoundExceptionat shader compilation → startup crash.Changes
osu.Android.props— Added a top-levelPackageReferenceforppy.Veldrid.SPIRVwithExcludeAssets="buildTransitive;build"andGeneratePathProperty="true"to suppress the dead MonoAndroid10 targets and expose$(Pkgppy_Veldrid_SPIRV)for direct content accessAndroidNativeLibrary— Pulls the arm64-v8a.sofrom the NuGet package content into the APK, same pattern as the existing BASS/FFmpeg native lib bundlingValidateFrameworkNativeLibrariestarget to fail early iflibveldrid-spirv.sois missing from the resolved package