react / react/react-native

Android: Broken Code Completion / Intellisense in Android Studio

オープン
#55,517 コメント 16 件 リアクション 9 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Needs: Triage :mag: Platform: Android
主要言語
C++
スター
127k
フォーク
25.3k
平均マージ
1日 23時間
マージ済み PR(30日)
4

説明

Description

Code completion does not work since React Native version 0.81.0

  1. Tested against few version of Android Studio: Narwhal, Otter, Panda
  2. Tested against few version of React Native: 0.81.x, 0.82.x, 0.83.x, 0.84.x
  • Noticed that gradle-plugin [gradle-plugin-root] is missing from project hierarchy on the left in Android Studio, not sure whether it's due to change of recent AGP version
Steps to reproduce
  1. Run React Native CLI to initiate project, e.g: npx @react-native-community/cli@latest init AwesomeProject0803 --version 0.81.0
  2. Run yarn && yarn start
  3. Run yarn android at least once
  4. Open Android Studio & allow it to for gradle sync & indexing... etc
  5. In MainActivity or MainApplication, try either of following
    a. Try to access React Native source code via Command + click in MacOS
    b. type on code to trigger code completion, e.g: override func onCreate to see whether anything happen
React Native Version

0.83.1

Affected Platforms

Build - MacOS, Runtime - Android

Output of npx @react-native-community/cli info
System:
  OS: macOS 26.2
  CPU: (12) arm64 Apple M2 Pro
  Memory: 134.20 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.14.0
    path: /Users/userA/Library/pnpm/node
  Yarn:
    version: 1.22.22
    path: /Users/userA/.yarn/bin/yarn
  npm:
    version: 10.9.2
    path: /Users/userA/Library/pnpm/npm
  Watchman: Not Found
Managers:
  CocoaPods: Not Found
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 25.2
      - iOS 26.2
      - macOS 26.2
      - tvOS 26.2
      - visionOS 26.2
      - watchOS 26.2
  Android SDK:
    API Levels:
      - "30"
      - "35"
      - "36"
    Build Tools:
      - 35.0.0
      - 36.0.0
      - 36.1.0
    System Images:
      - android-36 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2025.3 AI-253.29346.138.2531.14850935
  Xcode:
    version: 26.2/17C52
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 20.1.0
    wanted: 20.1.0
  react:
    installed: 19.2.3
    wanted: 19.2.3
  react-native:
    installed: 0.84.0-rc.4
    wanted: 0.84.0-rc.4
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: false
Stacktrace or Logs
-
MANDATORY Reproducer

https://github.com/JunPG/AwesomeProject0831

Screenshots and Videos

React Native 0.80.3

Image

React Native 0.83.1 (ReproducerApp)

Image

React Native 0.84.0-rc

Image

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

必須の再現用リポジトリから始め、React Native 0.80.3 と 0.81.x–0.84.x について、Gradle の同期後の Android Studio プロジェクトを比較します。gradle-plugin-root が存在するかを確認しながら、MainActivity と MainApplication を調査します。再現したプロジェクトで Android Studio がソースナビゲーションとコード補完を復元できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
android, react-native
領域
build-system, developer-experience, mobile
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。