The IDE Android resource link broken when the custom_package
is not set
#6563
Labels
awaiting-maintainer
Awaiting review from Bazel team on issues
lang: kotlin
Kotlin rules integration
product: Android Studio
Android Studio plugin
type: bug
Description of the bug:
When define an Android library,
If the
custom_package = "com.myPackage",
is not set, and if the BUILD file is under the root of your project dir, therules_kotlin
orrules_android
will pass a null value to init the IntelljiInfo. This will cause the resource link/preview not working in the IDE.For example: When hover over the R.color.xxx instead giving the color preview, it shows the generated R.class integer value. When click on the R.color.xxx it will navigate to the generated R class. The correct behavior is to show the color preview, and when click on the R.color.xxx it will navigate to the xml definition.
The proposed solution is: when the passed in
javaPackage
is null to IDE, use the package name defined in theAndroidManifest.xml
to get the package name for resources.The current behavior:
The expected behavior when hovering over the resource from Kotlin code:
Which category does this issue belong to?
No response
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
kt_android_library
with android resource and with resource and android manifestWhich Intellij IDE are you using? Please provide the specific version.
Android Studio Iguana | 2023.2.1 Patch 2
What programming languages and tools are you using? Please provide specific versions.
Kotlin
What Bazel plugin version are you using?
v2024.03.26
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: