Skip to content
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

Android Studio LadyBug Fails to Find cargo #310

Open
Archdoog opened this issue Oct 24, 2024 · 8 comments
Open

Android Studio LadyBug Fails to Find cargo #310

Archdoog opened this issue Oct 24, 2024 · 8 comments
Labels

Comments

@Archdoog
Copy link
Collaborator

willir/cargo-ndk-android-gradle#24

@ianthetechie
Copy link
Contributor

Weird. I had reports of similar issues from another user on Windows several weeks ago with a much older version of Android Studio. They eventually solved it but I never quite got out of them what the root cause was / how they fixed it. Not sure if this is the same though, since in their case it was usually errors about the NDK not being found rather than cargo itself.

Random idea: I know JetBrains IDEs are really funky with the way they execute your shell and get path info from it at launch. I have experienced issues in the past with my shell (fish + starship + a few other things) hanging and screwing up an entire IDE session in other JetBrains products. I assume you've done a restart, but worth asking...

@Archdoog
Copy link
Collaborator Author

Archdoog commented Nov 3, 2024

This looks interesting: https://github.com/mozilla/rust-android-gradle.

@Archdoog
Copy link
Collaborator Author

Archdoog commented Nov 4, 2024

Still haven't figured it out 🙃. Update: willir/cargo-ndk-android-gradle#24 (comment).

@ianthetechie
Copy link
Contributor

This looks interesting: https://github.com/mozilla/rust-android-gradle.

This project used to use that actually, but switched to the current setup after several issues. You might find this comment in particular interesting (not in a technical/solution sense, but in why I ultimately went with willr's solution instead): mozilla/rust-android-gradle#40 (comment).

@Archdoog
Copy link
Collaborator Author

Archdoog commented Nov 5, 2024

Workaround on MacOS is to open android studio using open -na "Android Studio" from terminal.

@ianthetechie ianthetechie pinned this issue Nov 5, 2024
@ahmedre
Copy link
Contributor

ahmedre commented Nov 5, 2024

2 things I noticed -

  1. I had this happen on the command line also, so I don't think it's Android Studio specific (it shows the correct path, including where cargo lives)
  2. killing Gradle daemons fixes it for me , without restarting Android Studio - i.e. ./gradlew --stop and then rebuilding on command line works (even if it was failing on command line as per point 1), and then going back to Android Studio and building works from then on.

@Archdoog
Copy link
Collaborator Author

Archdoog commented Nov 6, 2024

Here's the Android Studio issue ticket: https://issuetracker.google.com/issues/377339196. Feel free to vote "I am impacted" on top right.

@ahmedre
Copy link
Contributor

ahmedre commented Nov 13, 2024

It's not Android Studio specific though -
CleanShot 2024-11-13 at 21 54 47@2x

I got out of this by just doing ./gradlew --stop - building (both on command line and in the IDE) worked afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants