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
{{ message }}
Repository navigation
SamplesApp Android Debug head crashes on launch: R8 shrinks with no JNI keep rules #24943
A local Debug build of the SamplesApp Android head crashes on launch, because R8 has stripped AndroidX classes that only managed code reaches through JNI (androidx.core.splashscreen.SplashScreen, then androidx.activity.EdgeToEdge, …).
SamplesApp.csproj pins AndroidLinkTool=r8 for every configuration to avoid a d8 desugaring crash. In Debug, AndroidLinkMode is None, so the SDK never generates proguard_project_references.cfg, which holds the auto-generated keep rules for JNI-referenced types. The build warns about it:
warning XA4304: ProGuard configuration file ... was not found
As a result, R8 shrinks the app with no keep rules at all.
Expected behavior 🎯
The Debug Android head launches. R8 should only dex/desugar in Debug and not shrink.
How to reproduce it (as minimally and precisely as possible) 🔬
Launch the app on an emulator. It crashes with ClassNotFoundException for an AndroidX type.
Workaround 🛠️
Build with -p:DoNotSetAndroidLinkTool=true.
Renderer 🎨
Skia
Affected platforms 📱💻🖥️
Android
Uno.Sdk version (and other relevant versions) 📦
master (7.0)
IDE version 🧑💻
No response
Anything else we need to know? 💬
This only affects the repo's SamplesApp. Uno.Sdk does not pin AndroidLinkTool, so a Debug app built with it uses d8 and nothing is shrunk, and Release builds run the trimmer, which generates the keep rules.
A related packaging defect on the same head is tracked in #24520.
Activity
build(samplesapp): Stop R8 shrinking the Android Debug head (fixes #2…
build(samplesapp): Pin R8 for Release only (fixes #24943)
build(samplesapp): Pin R8 for Release only (fixes #24943)
build(samplesapp): Pin R8 for Release only (fixes #24943)
build(samplesapp): Pin R8 for Release only (fixes #24943)
build(samplesapp): Pin R8 for Release only (fixes #24943)
build(samplesapp): Pin R8 for Release only (fixes #24943)
build(samplesapp): Pin R8 for Release only (fixes #24943)