A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
Hello @Sreenivasan, Sreejith ,
Thanks for your question.
This is a known packaging/ZIP format issue introduced in .NET for Android when upgrading from .NET 8 to .NET 10. The error occurs because jarsigner encounters ZIP entries in stored mode where the declared sizes/CRCs don't strictly match what the tool expects.
This is fundamentally a build tooling/packaging regression in the .NET 10 Android SDK — it's not caused by your project configuration.
You can refer to following workarounds:
- Switch from
jarsignertoapksigner.
.NET 10 on Android now prefers apksigner over the legacy jarsigner. Add this to your csproj to force using apksigner:
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net10.0-android|AnyCPU'">
<AndroidPackageFormat>aab</AndroidPackageFormat>
<AndroidLinkMode>SdkOnly</AndroidLinkMode>
<AndroidUseAapt2>True</AndroidUseAapt2>
<AndroidCreatePackagePerAbi>False</AndroidCreatePackagePerAbi>
<AndroidEnableAssemblyCompression>false</AndroidEnableAssemblyCompression>
<RunAOTCompilation>false</RunAOTCompilation>
<AndroidEnableLLVM>false</AndroidEnableLLVM>
<AndroidUseApkSigner>true</AndroidUseApkSigner>
</PropertyGroup>
- Instead of relying on VS to sign, use
dotnet publishand pass signing params directly, this bypasses the problematicjarsignerpath:
dotnet publish -f:net10.0-android -c:Release \
-p:AndroidKeyStore=true \
-p:AndroidSigningKeyStore=your.keystore \
-p:AndroidSigningKeyAlias=youralias \
-p:AndroidSigningKeyPass=yourpass \
-p:AndroidSigningStorePass=yourstorepass
- Make sure you have
Android SDK Build Tools 36.0.0(which the workload image shows is present). If not, update via Android SDK Manager. Older build tools can have ZIP alignment/signing incompatibilities. - Verify workload is fully up to date.
Run:
dotnet workload update
And verify the Android workload version is the latest 10.0.203.x. There may be a patch release that addresses this specific bug.
Please try it and let me know if it works. I’m ready to support you if you have any further questions.
I hope this addresses your concern. If you found it helpful, please consider sharing your feedback using the guidance .