Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[jnigen] IntelliSense not working in example/kotlin_plugin and other IDEs #2264

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

Closed
dodgog opened this issue May 1, 2025 · 5 comments
Closed

Comments

@dodgog
Copy link

dodgog commented May 1, 2025

I am cloning the repo and running the pkgs/jnigen/example/kotlin_plugin example. Everything compiles and works. But I can't get any intelligent code features in the kotlin library being imported (e.g. the Example class), such as syntax highlighting, errors, manual pages when I hover over a kotlin class.
I also can't get highlighting on the code which is generated in the example/build/kotlin_plugin/generated path.

I recon this is not an issue just with Android Studio, where I'm working, it happens in VSCode as well, whereas normal projects, such as libraries and apps work as expected.

@HosseinYousefi
Copy link
Member

Are you opening only the kotlin_plugin/example or is this happening when you open the whole jnigen in your workspace. I personally don't have any issue if I open only the example directory.

@dodgog
Copy link
Author

dodgog commented May 5, 2025

When i’m opening the IDE at the kotlin_plugin folder and navigate to the file
kotlin_plugin/android/src/main/kotlin/Example.kt
this happens. There is no kotlin support for this file in my IDE.
Also if I generate some kotlin code, for example sqldelight, and it shows up in the file: kotlin_plugin/example/build/kotlin_plugin/generated/sqldelight/code/Database/release/com/example/database/Database.kt that file also doesn’t have IntelliSense support no matter if I open the IDE at kotlin_plugin or kotlin_plugin/example.

To answer the question, I’m not opening the project at jnigen root.

@HosseinYousefi
Copy link
Member

There is no kotlin support for this file in my IDE.

This is not in the scope of jnigen, right? jnigen is a Dart binding generator. Probably opening kotlin_plugin/android/ in Android Studio will help you get IDE support but this is the wrong place to open this issue.

@dodgog
Copy link
Author

dodgog commented May 6, 2025

Could you point me to the right place? Opening the kotlin_plugin/android/ in Android Studio doesn't help, it's an issue of how the dart template sets up the gradle project. Likely a missing gradle.settings file.

@HosseinYousefi
Copy link
Member

There is a settings.gradle in kotlin_plugin/android/.

I'm afraid I cannot help you as

  1. I don't have a problem with anything in my IDE.
  2. An IDE problem with Kotlin is not an issue with jnigen, a Dart bindings generator.

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

No branches or pull requests

2 participants