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
As shown in the image, the unusable codes are not being removed in the apk compilation.
A project was created in maui for the android platform, but when I generate the apk and decompile the apk in JADX, I see that the WebView codes that were not used at any time are in the apk
Steps to Reproduce
1 Create a new project.
2 Generate the apk file.
3 Open JADX and locate the apk.
4 In the Navigation tab > Search by text
5 In the search box type > Webview
@RobersonGazolli have you disabled the use of r8 by any chance? Its usually r8 which is responsible for removing unused java types from the java side of the app.
We suspect this issue is stale and no longer relevant. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.
This issue will now be closed since it had been marked "possibly-stale" but received no further activity in the past 14 days. It is still possible to reopen or comment on the issue, but please note that the issue will be locked if it remains inactive for another 30 days.
Activity
jpobst commentedon Mar 19, 2025
Are you compiling in
Releasemode? The trimmer doesn't run inDebugmode.You also might want to try .NET 9. I'm not sure that MAUI was fully trimmer enabled in .NET 8.
[-]Unusable codes are not being removed[/-][+]Unused MAUI `.java` not being trimmed[/+]RobersonGazolli commentedon Mar 20, 2025
@jpobst I updated my VS 2022 to .NET 9 latest version, I created a project again and compiled it in Release mode, but I still have the same problem.
dellis1972 commentedon Mar 20, 2025
@RobersonGazolli have you disabled the use of
r8by any chance? Its usually r8 which is responsible for removing unused java types from the java side of the app.29 remaining items
dellis1972 commentedon Mar 24, 2025
Hmm. Its still skipping the _CompileToDalvik target. Did you delete the bin and obj directories?
Might be better to build from the command line.
Delete both bin and obj directories then run
This will output a
msbuild.binlogRobersonGazolli commentedon Mar 24, 2025
Please check now.
msbuild.zip
RobersonGazolli commentedon Mar 25, 2025
https://github.com/RobersonGazolli/MauiAppNet9.git
I sent the project to git, so it can be downloaded for better analysis.
RobersonGazolli commentedon Sep 25, 2025
regarding this issue, is there any update?
@jonpryor @jpobst @dellis1972 @jonathanpeppers
dotnet-policy-service commentedon Jul 22, 2026
We suspect this issue is stale and no longer relevant. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.
dotnet-policy-service commentedon Aug 5, 2026
This issue will now be closed since it had been marked "possibly-stale" but received no further activity in the past 14 days. It is still possible to reopen or comment on the issue, but please note that the issue will be locked if it remains inactive for another 30 days.