-
Notifications
You must be signed in to change notification settings - Fork 228
LSP can't find android, androidx reference #411
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
Comments
Hard to say whats wrong without seeing the language server logs. My main guess is that you use Gradle, and the dependency resolution fails. As this is Android, my main guess is that you might have an error like I describe here: #376 (comment) If you can share your language server logs (during project initialisation) that would be great :) Then we can hopefully see what the issue is in your case. |
Heres the log, ill be checking the thread you mentioned. thank you. |
After reading the log I've figured out its probably my java version, however I do have JAVA 11 installed, and I already tried changing the environment variable and adding the bin to the path but LSP still wont take, I even uninstalled java 19 and still refuses to use java 11. Not sure if I'm doing something wrong |
Hi, I'm having this same issue but it wasn't fixed by adding the |
here is a similar config i made if anyone wants to copy paste local lspconfig = require("lspconfig")
local java_path = "java/path"
lspconfig["kotlin_language_server"].setup({
on_attach = on_attach,
cmd_env = {JAVA_HOME=java_path},
root_dir = lspconfig.util.find_git_ancestor
})
|
I'm using Nvim with this LSP and for some reason it can't recognize the android and androidx packages and I'm not sure what I'm doing wrong.
The text was updated successfully, but these errors were encountered: