Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve error message when no assemblies are found (#6968)
Context: #6838 Context: #6838 (comment) Context: #6838 (comment) Android Gradle Plugin 4.1.0 introduced ZIP file minification, using a utility named [`zipflinger`][0] which recompresses the APK/AAB archive including contents of the `assemblies/` directory (which contains managed assemblies, assembly blobs, runtime config blob etc). This has the unfortunate effect that no assemblies are found, because of [this check][1] in our code. The check silently ignores all entries which are compressed (that is, they don't use the `STORE` ZIP compression mode) and, in effect, no assemblies are mapped/loaded, leading to this confusing error message: A/monodroid: No assemblies found in '(null)' or '<unavailable>'. Assuming this is part of Fast Deployment. Exiting... The [check][1] is designed to optimize the loading process, because it allows us to skip comparing names of an unknown number of **compressed** entries in the APK, so modifying it to do that regardless of compression mode would result in performance degradation during startup for all applications, not just those which enable AGP minification feature. Instead, improve the error message suggesting where the problem might be. [0]: https://android.googlesource.com/platform/tools/base/+/refs/heads/mirror-goog-studio-master-dev/zipflinger/ [1]: https://github.com/xamarin/xamarin-android/blob/e50b457fa236e6fc127eadc0cfa527934a03e7de/src/monodroid/jni/embedded-assemblies-zip.cc#L60-L62
- Loading branch information