-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression in OSX virtual environment 20210718.2
: Android Studio build tools appear to be corrupted
#3757
Comments
20210718.2
: Android Studio build tools appear to be corrupted
Hi, @shankari |
From the first SO link that you provided, SDK tools 31 is in fact corrupted and we need to wait for a patch from Google. Either downgrading to v30.0 ("uncheck "Show Package Details" and then you can select a lower version.") or "upgrade to Android Gradle Plugin 7.0" seems to require modifying the Android Studio install. But I'm not installing android studio manually - I'm using the pre-installed Android Studio in the virtual environment. In https://github.com/actions/virtual-environments/blob/macOS-10.15/20210712.4/images/macos/macos-10.15-Readme.md (working), the list of installed build tools is
In https://github.com/actions/virtual-environments/blob/macOS-10.15/20210718.2/images/macos/macos-10.15-Readme.md (not working), the list of installed build tools is
So basically, the newer image added SDK build-tools = 31, which is corrupted and breaks android studio. Are you expecting every developer to write a task to downgrade the build tools using the sdk manager from the command line? Seems like it would be much easier to fix the image once and for all. |
@shankari we are sorry to hear that you're experiencing issues, but it looks like the dx removal is by design and all the following build-tools won't have dx as well: |
From the readme.md, it seems like it's missing Android SDK Tools. The following is from 20210626.1 (https://github.com/actions/virtual-environments/blob/macOS-10.15/20210626.1/images/macos/macos-10.15-Readme.md#android) This issue is blocking us from build Android. We are using Microsoft DevOps so we can't do anything.
|
@nokiadingding SDK tools are in place in
|
Even with that version builds are failing with the mentioned error. |
@luissilvaos could you please provide the full log of failed build with 30.0.3? |
Here is @miketimofeev
|
@luissilvaos yes, it looks like the project still tries to use build-tools 31. Is it possible to create minimal repro steps? I assume that some configuration needs to be changed. |
Yes, but I have no reference for build-tools 31 nor sdk 31. Everything was working as planned/expected until a couple of days ago.
Yes, I managed to overcome this just by uninstalling build-tools 31. |
@luissilvaos I can only guess that this setting is not picked up by the build system, but, unfortunately, we couldn't help you without repro-steps. |
@luissilvaos can you add instructions to programatically uninstall build-tools 31 in a GHA here? It will save the rest of us a lot of time 😄 |
@shankari you can find uninstallation steps in this comment |
@miketimofeev The proposed workaround worked "almost" for me, I just had to add an additional link for the
@luissilvaos I also had the issue with |
@miketimofeev here are the repro steps:
The project will use Android Build Tools 29.0.2 and it will fail due to the corrupted build tools 31. |
Is it possible to specify a previous ImageVersion ? Current image version: 20210719.0 fails, |
Currently, we can't specify a particular version. |
Also, are we tracking both Windows and OSX here in the same bug? |
@gopi-hl yes, as the issue is the same for all OSs. |
@luissilvaos Unfortunately, it turned out that there is a bug in Cordova that prevents pinning build-tools version: |
I observed it fails in cordova-android @9.0.0 too. ionic cordova build android --prod --release -- -- --gradleArg=-PcdvBuildToolsVersion=30.0.2 |
Fixed in 10.0 though - |
@gopi-hl but doesn't work for some reason |
I can confirm you that this is caused by cordova. One of my projects start building after removing the dependency for cordova. Thanks for your help! |
|
So, as of now, the only workaround is to not have version 31 installed on the image. Why is it so hard to remove? Seems like it is causing more issues than what the upgrade is worth. Atleast, until GOOG fixes it? |
@gopi-hl I had the same issues with Have you tried that? |
I use a Windows 2019 machine for builds (Azure DevOps) - so have to figure how this translates to the command line. For some reason, a Mac/Ubuntu machine never worked for me well for my ionic app. |
@gopi-hl I'm afraid google won't fix it as dx compiler deprecation was planned and all the future build-tools will be released without it and will have this issue as well, that's why we wouldn't like to remove that particular version.
|
Thank you @miketimofeev ! Works like a charm. |
We are building react native apps using VS AppCenter. Android builds no longer able to install. and in appCenter pipeline, we cant configure build os version. This is big blocker for us now. here is our android build configuration
Can someone help us here ? what should we put for buildToolsVersion ? Thanks |
@bhirave one of the possible workarounds is to use a pre-build script that deletes the latest build-tools
|
@shankari and all the others who experience the issue with cordova — could you try the new 10.0.1 versions that allows to pin build-tools version? |
@miketimofeev paper deadline Apr 1st, which is why I haven't even implemented the simple workarounds so far. Will implement the workaround first thing next week, but will experiment with the newer version sometime the week after that. |
@miketimofeev you rock. We are able to unblock ourselves using prebuild script. Thank you again for prompt reply. |
Workaround from actions/runner-images#3757 (comment) until we upgrade to the most recent version of cordova Other fixes: - rename the android CI workflow to clarify that we only build on OSX - highlight the tools uninstallation in the README
The issue seems to be resolved on Cordova side. |
wrt
I don't see any explicit confirmation here, so for the record, I upgraded to cordova-android@10.0 |
Here is an action with the above solution that worked for me:
|
Description
Building an ionic/cordova project using Github actions fails, although it was passing two days ago.
The build logs say:
There have been no changes to the native code in the past two days.
Virtual environments affected
Image version and build link
https://github.com/e-mission/e-mission-phone/runs/3109100824?check_suite_focus=true
Is it regression?
https://github.com/e-mission/e-mission-phone/runs/3094799247?check_suite_focus=true
Expected behavior
The build would be successful, as it was in version
20210712.4
, two days ago (https://github.com/e-mission/e-mission-phone/runs/3094799247?check_suite_focus=true)Actual behavior
The build is failing in version
20210718.2
, today (https://github.com/e-mission/e-mission-phone/actions/runs/1046721329) although there have been no changes to the android code.Repro steps
20210712.4
: it passes20210718.2
: it failsThe text was updated successfully, but these errors were encountered: