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
Android AAR drops every stdlib directory starting with _ (AGP ignoreAssetsPattern) #546
The python-multiplatform-android AAR ships no stdlib directory whose name starts with _ (reported by torchnative against 3.15.0-alpha03, built from develop d2df489).
copyAndroidPythonAssets stages them (build/android/assets/arm64-v8a/lib/python3.15t/zipfile/_path exists), but the AAR has none: zipfile/_path, _pyrepl, __phello__, compression/_common, ensurepip/_bundled and the like are missing. AGP's default ignoreAssetsPattern contains <dir>_*, which drops every asset directory starting with _ when the library's assets are merged.
Effect: importlib.metadata needs zipfile._path, so an app importing it fails on the device with "No module named 'zipfile._path'". An app-side pattern override cannot restore files the AAR never had (the app side is toolchain #166).
Fix: set androidResources.ignoreAssetsPattern in python-multiplatform/build.gradle.kts to AGP's default without <dir>_*.
Completion criterion: unzip -l <aar> | grep zipfile/_path lists the directory, and a new instrumented test (AndroidStdlibAssetsTest) that imports zipfile._path and importlib.metadata on the device passes in CI (it fails on the current AAR).
Activity
Merge pull request #547 from thisisthepy/feat/aar-underscore-assets
b-re-w commentedon Nov 27, 2026
Landed in develop via #547.