Skip to content

Android+NativeAOT runtime tests fail: hardcoded launcher activity name #24119

Open

Description

@MartinZikmund

Current behavior 🐛

The Tests - Android+NativeAOT Skia stage fails on every feature/breakingchanges build since the update to .NET 11 Preview 7 (#24054). All five job attempts fail with:

adb shell am start -n uno.platform.samplesapp.skia.nativeaot/crc6448f3b0362cbf4bc9.MainActivity ...
Error type 3
Error: Activity class {uno.platform.samplesapp.skia.nativeaot/crc6448f3b0362cbf4bc9.MainActivity} does not exist.

The app therefore never starts, no results file is written, and the job ends with:

ERROR: The test results file TestResult-<stamp>.xml does not exist (did nunit crash ?)

build/test-scripts/android-run-skia-runtime-tests.sh hardcodes the Java Callable Wrapper (JCW) class name of the launcher activity. That name is generated by the Android toolchain and is not a stable contract:

  • the Mono build emits crc64<hash>.MainActivity
  • the NativeAOT build emits its wrappers through the typemap as scrc64<hash> — different prefix and different hash
  • the hash itself is derived from the activity's namespace/assembly, so it also moves whenever those are renamed or heads are consolidated

Comparing the generated stubs in the samplesapp-android-skia-nativeaot-logs binlog either side of the regression:

Build Commit Generated wrapper
227595 (green) 40c4a8981 typemap/java/crc6448f3b0362cbf4bc9/MainActivity.java
228363 (red) c2831a9b45f typemap/java/scrc6415f86cac20992436/MainActivity.java

Only the toolchain bump sits between those two commits — git log 40c4a8981..9582c40fd is "Update to .NET 11 Preview 7" plus "use Mono.Cecil 0.11.6", with no Uno source changes.

The Mono-based Tests - Android Skia stage is unaffected, because it still emits crc64… and happens to match the hardcoded value.

Expected behavior 🎯

The Android runtime-test script launches the app regardless of which wrapper scheme the toolchain used, and fails fast with a clear message if no launcher activity can be resolved.

How to reproduce it (as minimally and precisely as possible) 🔬

Run the Tests - Android+NativeAOT Skia stage on feature/breakingchanges at c2831a9b45f or later. Reproduced on builds 227658, 227685, 227738 and 228363.

Workaround 🛠️

None for CI. Updating the hardcoded constant to scrc6415f86cac20992436 would work until the next namespace, assembly or toolchain change moves it again.

Renderer 🎨

  • Skia
  • Native

Affected platforms 📱💻🖥️

Android — CI only (the Tests - Android+NativeAOT Skia stage).

Uno.Sdk version (and other relevant versions) 📦

feature/breakingchanges (7.0 development), .NET 11 Preview 7.

IDE version 🧑‍💻

N/A — CI script.

Anything else we need to know? 💬

The robust fix is to stop hardcoding a toolchain-internal hash and resolve the launcher activity from the installed package at run time (adb shell cmd package resolve-activity --brief <package>, API 26+; the emulator runs API 34). That covers both crc64 and scrc64, and keeps working when the SamplesApp heads are consolidated.

Activity

  1. added
    triage/untriaged
    on Aug 19, 2026
  2. added
    7.0
    on Oct 14, 2026
  3. removed
    triage/untriaged
    7.0
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions