bazelbuild / intellij

IntelliJ plugin for Bazel projects
https://ij.bazel.build/
Apache License 2.0
761 stars 303 forks source link

AndroidStudio bazel sync can't find android sdk toolchain on Ubuntu. #5112

Closed SupSaiYaJin closed 6 months ago

SupSaiYaJin commented 1 year ago

Description of the bug:

Sync will be failed by No matching toolchains found for types @bazel_tools//tools/android:sdk_toolchain_type. image

I have debug bazel and found clientEnv is missing ANDROID_HOME, but I'm sure I have set it in ~/.zshrc. It's strange that running bazel build has no such problem at all and it only have this problem on Ubuntu. image

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Just use the simplist Android bazel project and don't set path on android_sdk_repository.

Which Intellij IDE are you using? Please provide the specific version.

Android Studio Flamingo | 2022.2.1 Patch 2

What programming languages and tools are you using? Please provide specific versions.

No response

What Bazel plugin version are you using?

2023.06.13-aswb.0.1-api-version-222

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

Pavank1992 commented 1 year ago

This issue only affects 3P users and AS team is willing to review PRs fixing it.

mai93 commented 1 year ago

Please note that PRs related to Android Studio support should be based on the google branch to be imported.

gersomonline commented 1 year ago

I also need a fix for this, all Bazel actions (build included) from inside the IDE do not work. From the terminal, however, it does work.

fredyw commented 1 year ago

+1 for the bug.

github-actions[bot] commented 6 months ago

Thank you for contributing to the IntelliJ repository! This issue has been marked as stale since it has not had any activity in the last 6 months. It will be closed in the next 14 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale.

github-actions[bot] commented 6 months ago

This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please post @bazelbuild/triage in a comment here and we'll take a look. Thanks!