You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[xabt] fall back to libZipSharp on .NET framework (#10238)
Fixes: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2510554
In testing .NET 10, we found the issue:
ADB0010: Mono.AndroidTools.InstallFailedException: Unexpected install
output: Failure [-124: Failed parse during installPackageLI: Targeting
R+ (version 30 and above) requires the resources.arsc of installed
APKs to be stored uncompressed and aligned on a 4-byte boundary] ...
1. Create a new .NET MAUI/MAUI Blazor app.
2. Change the value for the Color attribute to #FF0000 or any color.
```xml
<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#FF0000" BaseSize="128,128" />
```
3. Deploy to android.
4. The splash screen color should change according to the chosen color.
5. Stop Debugging and change the splash screen color again.
6. If you do it enough times, you would encounter the error.
Manually, adding `$(_AndroidUseLibZipSharp)` to the `.csproj` file
solves the issue:
<_AndroidUseLibZipSharp>true</_AndroidUseLibZipSharp>
Reviewing, a `.binlog` created by setting `%MSBUILDDEBUGENGINE%=1` and
launching Visual Studio, we see the message:
Task BuildArchive
...
Using System.IO.Compression because no uncompressed file extensions were specified.
So, we are relying on .NET Framework's `System.IO.Compression` to
handle `.apk` creation in some cases. `libZipSharp` *was created*
because of bugs in .NET Framework's & Mono's implementation of
`System.IO.Compression` that caused issues with Android packaging.
To fix this, we will always use `libZipSharp` for .NET Framework,
regardless if files are compressed or not.
0 commit comments