Skip to content

can not trigger Kotlin code suggestions #55814

Open

Description

@zhuminjunivan

Description

In MainActivity,can not trigger Kotlin code suggestions.
But Comment out the code then can trigger code suggestions
import com.facebook.react.ReactActivity
import com.facebook.react.ReactActivityDelegate
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
import com.facebook.react.defaults.DefaultReactActivityDelegate

Steps to reproduce

1、create project
2、open Android Studio
3、open MainActivity
4、print code

React Native Version

0.83.2

Affected Platforms

Runtime - Android

Output of npx @react-native-community/cli info

System:
  OS: Windows 11 10.0.26200
  CPU: (8) x64 Intel(R) Core(TM) i3-10100 CPU @ 3.60GHz
  Memory: 9.24 GB / 31.75 GB
Binaries:
  Node:
    version: 24.12.0
    path: C:\Users\zhumi\AppData\Local\Volta\tools\image\node\24.12.0\node.EXE
  Yarn:
    version: 4.10.3
    path: C:\Users\zhumi\AppData\Local\Volta\tools\image\yarn\4.10.3\bin\yarn.CMD
  npm:
    version: 11.6.2
    path: C:\Users\zhumi\AppData\Local\Volta\tools\image\node\24.12.0\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK:
    API Levels:
      - "28"
      - "29"
      - "30"
      - "31"
      - "32"
      - "33"
      - "34"
      - "35"
      - "36"
      - "36"
    Build Tools:
      - 28.0.3
      - 29.0.2
      - 29.0.3
      - 30.0.0
      - 30.0.3
      - 31.0.0
      - 33.0.0
      - 33.0.1
      - 34.0.0
      - 35.0.0
      - 36.0.0
      - 36.1.0
    System Images:
      - android-23 | Android TV Intel x86 Atom
      - android-29 | Google Play Intel x86 Atom
      - android-31 | Google APIs Intel x86 Atom_64
      - android-35 | Google APIs Intel x86_64 Atom
    Android NDK: Not Found
  Windows SDK:
    AllowDevelopmentWithoutDevLicense: Enabled
    AllowAllTrustedApps: Enabled
IDEs:
  Android Studio: Not Found
  Visual Studio: Not Found
Languages:
  Java:
    version: 18.0.2.1
    path: C:\Program Files\Common Files\Oracle\Java\javapath\javac.EXE
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli":
    installed: 20.0.0
    wanted: 20.0.0
  react:
    installed: 19.2.0
    wanted: 19.2.0
  react-native:
    installed: 0.83.2
    wanted: 0.83.2
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs

none

MANDATORY Reproducer

none

Screenshots and Videos

Activity

  1. react-native-bot commented on Feb 28, 2026

    @react-native-bot
    Collaborator

    Warning

    Missing reproducer: We could not detect a reproducible example in your issue report. Reproducers are mandatory and we can accept only one of those as a valid reproducer:


    You can read more about about it on our website: How to report a bug.

  2. zhuminjunivan commented on Feb 28, 2026

    @zhuminjunivan
    Author
    Image Image
  3. zhuminjunivan commented on Feb 28, 2026

    @zhuminjunivan
    Author

    why can not upload video?

  4. likeSo commented on Feb 28, 2026

    @likeSo

    Let me provide some background information. The problem is that even after running npm i and gradle sync, Android Studio still cannot correctly index the React Native code, right?

    我来帮你补充一些背景,这个问题是在已经npm i,gradle sync之后,在android studio里面仍然无法正确索引到RN的代码,对吧?
    我觉得你最好再补充一些其他的内容,比如确认npm i和gradle sync的过程中,是否出现过报错,不然很难定位问题的

  5. zhuminjunivan commented on Feb 28, 2026

    @zhuminjunivan
    Author

    Let me provide some background information. The problem is that even after running npm i and gradle sync, Android Studio still cannot correctly index the React Native code, right?

    我来帮你补充一些背景,这个问题是在已经npm i,gradle sync之后,在android studio里面仍然无法正确索引到RN的代码,对吧? 我觉得你最好再补充一些其他的内容,比如确认npm i和gradle sync的过程中,是否出现过报错,不然很难定位问题的

    yes,after running npm i and gradle sync.and app can run right.just can not trigger kotlin code suggestions,others is ok.
    As long as there are no React Native related imports, other Kotlin files are fine.
    Image

  6. DHRUV-1000101 commented on Mar 31, 2026

    @DHRUV-1000101

    see #55517. It is similar to your issue and you can try these workarounds.

  7. react-native-bot commented on Sep 28, 2026

    @react-native-bot
    Collaborator

    This issue is stale because it has been open for 180 days with no activity. It will be closed in 7 days unless you comment on it or remove the "Stale" label.

  8. react-native-bot commented on Sep 28, 2026

    @react-native-bot
    Collaborator

    This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

  9. added
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    and removed
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: AttentionIssues where the author has responded to feedback.Needs: ReproThis issue could be improved with a clear list of steps to reproduce the issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions