Status Update
Comments
ya...@google.com <ya...@google.com>
ga...@google.com <ga...@google.com>
am...@google.com <am...@google.com> #2
Looks like the github repo is private. I can't open the link. Can you share the build file snippet or better a project you can share where this is reproducible?
I gather that you are able to generate the Apks with the correct version codes through command line but when building the application through Studio, you expect the Apk to be produced for the device type that is plugged in but it is generating an apk with version code specific to a different device type?
al...@signal.org <al...@signal.org> #3
Hello! Sorry about that, here is the correct link.
Note that this is currently built with AGP 8.0.2. Upgrading to AGP 8.1.0 requires minor changes but I'd rather ensure they work myself before posting them here (I can add them in a follow-up comment)
I gather that you are able to generate the Apks with the correct version codes through command line but when building the application through Studio, you expect the Apk to be produced for the device type that is plugged in but it is generating an apk with version code specific to a different device type?
This is correct.
al...@signal.org <al...@signal.org> #4
As far as I can tell to update to AGP 8.1.0 the only required changes are to update the version in build.gradle and then generate the verification metadata via
./gradlew --write-verification-metadata sha256 assemblePlayProdDebug
That should get it building for you, though I'll admit it's been a while since I've set the repo up from scratch.
If this fails, I'll speak to my team and see if we can't publish a branch with the migration completed so you can take a look.
am...@google.com <am...@google.com>
am...@google.com <am...@google.com> #5
The fix is submitted and it will most likely be included in AGP 8.3(Iguana) Canary 2. Deployed Apk should now include manifest with the version code specific to the target device's abi.
am...@google.com <am...@google.com>
am...@google.com <am...@google.com>
am...@google.com <am...@google.com> #6
A submitted change will fix this in the next Iguana release and we are working to get approval to cherry-pick in hedgehog. Thanks
an...@google.com <an...@google.com> #7
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Hedgehog | 2023.1.1 RC 1
- Android Gradle Plugin 8.2.0-rc01
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
Description
STEPS TO REPRODUCE:
1. Update AGP to 8.1
2. Plug in an ARM device
3. Build the application
4. Note that the APK has the expected file name but incorrect version code.
Here's where we've set up the versionCodeOverride:
Studio Build:Build #AI-223.8836.35.2231.10406996, built on June 29, 2023
Version of Gradle Plugin: 8.1.0
Version of Gradle: 8.0.2
Version of Java: openjdk 17.0.8 2023-07-18
OS: Linux (Manjaro)