Closed robotchaoX closed 8 months ago
@DanAlbert @enh-google PTAL
I added explanatory comments but otherwise LGTM.
... but our CI's broken. I'll go look into that.
GitHub is currently in the middle of rolling out changes to the GHA images that alter how the Android tools are installed: https://github.com/actions/runner-images/issues/8952. That bug says that sdkmanager
is supposed to still be there, but maybe that isn't happening. I see Sentry updated their CI to use https://github.com/android-actions/setup-android, which I think tells us the problem:
Adding platform-tools (contains adb) and cmdline-tools/11.0/bin (contains sdkmanager) to $PATH.
I guess sdkmanager
moved to a non-predictable location? Awesome. I'll send a PR to switch us over to setup-android.
https://github.com/android/ndk-samples/pull/975 appears to fix it. Once that merges I'll rebase this PR so the checks can re-run, then it should be good to merge.
[Why] Property useLegacyPackaging determin whether to use the legacy convention of compressing all .so files in the APK. If null, .so files will be uncompressed and page-aligned when minSdk >= 23. Otherwise, it failed with "INSTALL_FAILED_INVALID_APK: Failed to extract native libraries, res=-2" when minSdk >= 23. And wrap.sh is only available for API level 27 and above.
[How] Set useLegacyPackaging to true. Set compileSdk to 27.
[Reference] https://developer.android.com/ndk/guides/asan