Use `--output-pinvokes` feature to remove extra `.so` files from apps
- Dominant language
- C#
- Stars
- 2.1k
- Forks
- 579
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 252
Description
### Android application type
Android for .NET (net6.0-android, etc.)
### Affected platform version
.NET 6+
### Description
Context: https://github.com/dotnet/linker/issues/2853#issuecomment-1160801078
If you `dotnet new android` and then build with `-c Release`, you get an `.apk` with a couple extra native libraries:

In this case, we don't think the app actually needs `libSystem.IO.Compression.Native.so` or `libSystem.Security.Cryptography.Android.Native.so`.
We think it might be possible to use `--output-pinvokes` and completely drop certain `.so` files from projects.
### Steps to Reproduce
1. `dotnet new android`
2. `dotnet build -c Release`
### Did you find any workaround?
_No response_
### Relevant log output
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.