-
Notifications
You must be signed in to change notification settings - Fork 8
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
validateHasCargo
keep failing on macOS
#24
Comments
I'm also having this issue after upgrading to the latest Android Studio Ladybug | 2024.2.1 Patch 1 on our project https://github.com/stadiamaps/ferrostar. Even modified the PATH to the exact $HOME/.cargo/bin and same result. Cargo's definitely in the $PATH and the only thing that changed was upgrading Android Studio. |
Do you still maintain this? @willir |
Did some exploring, but still haven't figured out a solution. Notes from debuggingI built out this to very simply test the issue in the project I'm working on. tasks.register("checkCargo", Exec) {
workingDir '../common'
commandLine 'sh', '-c', "cargo --version"
} This task fails with "No such file or directory", similarly not finding sh nor cargo. Removing the This only happens from Android Studio's gradle run. Some potentially related issues
Will keep working and report back here once I figure out what's messed up. |
That's incredibly strange. It feels like it basically has to be an Android Studio configuration issue, since it works with I heard one other report of a user encountering this by the way. Unfortunately I couldn't get any useful debugging information out of them beyond that eventually they got it working. I do know that the user was using some older version of Android Studio initially, and that they ultimately succeeded building with Koala. However, I don't remember if they solved the cargo path issue before or after the Android Studio upgrade. They reported that they had installed Rust via rustup. I have been able to use the same Android Studio build as @Archdoog without issue. And yesterday I upgraded to Ladybug Patch 2 without incident (builds still working within Android Studio).
As far as I can tell, my local builds are using the Temurin JDK 17, and I'm using that for Gradle as well. I've installed Rust via rustup. |
This is interesting. I do have a warning from the Android studio that I have a mismatched JDK setting. I'll retake a look at this. |
@setoelkahfi I'm not sure what the root of the issue is, but running Android Studio from a terminal with |
That works for me too.. Super weird! Some people had success running Looking at |
Hi, I currently don't have the capacity to investigate the issue :-( |
Thanks for the response @willir! We're going to open an issue upstream with Google about this (can post a link here later). So far it's looking like the issue is not specific to this Gradle plugin but is most likely a bug in Android Studio (given that the same error can be reproduced with just a vanilla |
I would also double-check how you set the |
Ok, |
Probably related: #9
I keep getting
Failed to run 'cargo --version'. You probably don't have 'cargo' executable in PATH
error on MacOS while the printed patch definetely has.cargo/bin
in it. Any clue?My gradle file:
The text was updated successfully, but these errors were encountered: