Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>AndroidSupportFramework-VsCodeNew to Visual Studio Code? Get it now.
AndroidSupportFramework-VsCode

AndroidSupportFramework-VsCode

jikun

|
5 installs
| (0) | Free
解析 Android.bp/mk,从 AOSP 编译产物加载 Jar,实现 Java 智能提示与代码导航
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AndroidSupportFramework

A VS Code extension for AOSP (Android Open Source Project) development. It automatically parses Android.bp / Android.mk, locates framework jar packages from compiled output, and adds them to your Java project — enabling code navigation and IntelliSense for AOSP framework classes.

一款面向 AOSP(Android 开源项目) 开发的 VS Code 扩展。自动解析 Android.bp / Android.mk,从编译产物中定位 framework jar 包,并添加到 Java 工程的依赖中,从而实现对 AOSP framework 类的代码导航与智能提示。

Features / 功能

🎨 Android.bp Syntax Highlighting / 语法高亮

Provides syntax highlighting for .bp files (Android Blueprint build files).

为 .bp 文件(Android Blueprint 构建文件)提供语法高亮。

📦 AOSP Config Side Panel / 配置侧边栏

A dedicated Activity Bar panel with the following capabilities:

专属 Activity Bar 面板,具备以下能力:

  • Auto-detect AOSP source path – Automatically searches upward from the workspace to find the AOSP root directory. You can also manually select a custom source path. 自动检测 AOSP 源码路径 – 从工作区向上递归查找 AOSP 根目录,也可手动选择。

  • Select product name – Scans out/target/product/ to list all compiled products for selection. 选择产品名称 – 扫描 out/target/product/ 列出所有已编译产品。

  • Parse Android.bp / Android.mk – Parses build files in the current workspace and lists all supported modules (cc_library_static, cc_library_shared, cc_binary, java_library, java_library_static, android_app). 解析 Android.bp / Android.mk – 解析当前工作区的构建文件,列出所有支持的模块类型。

  • Load jar dependencies – Locates framework jar files from AOSP build output (out/target/product/<product>/obj/JAVA_LIBRARIES/) based on module dependencies, and automatically adds them to java.project.referencedLibraries in .vscode/settings.json. 加载 jar 依赖 – 根据模块依赖,从 AOSP 编译产物中定位 framework jar 文件,并自动添加到 .vscode/settings.json 的 java.project.referencedLibraries。

  • Quick navigation – Click the folder icon to open the AOSP source directory of a library; click the jar icon to reveal the jar file in your OS file manager. 快速导航 – 点击文件夹图标打开库的 AOSP 源码目录;点击 jar 图标在系统文件管理器中定位 jar 文件。

  • Disk cache – module-info.json is cached in memory and on disk. Projects sharing the same AOSP source path reuse the cache for faster startup. 磁盘缓存 – module-info.json 采用内存 + 磁盘二级缓存,相同 AOSP 源码路径的工程共享缓存,加速启动。

Prerequisites / 前提条件

  • AOSP source code must be checked out locally (or accessible via a mapped drive). AOSP 源码需在本地检出(或可通过映射盘访问)。
  • AOSP build output (out/ directory) must exist — run make / m to compile before using "Load jar". AOSP 编译产物(out/ 目录)必须存在 — 使用"Load jar"前请先执行 make / m 编译。
  • Java Extension Pack (auto-installed as a dependency). Java Extension Pack(作为依赖自动安装)。

Installation / 安装

From VS Code Marketplace(推荐)

Search for AndroidSupportFramework in the VS Code Extensions view and install.

在 VS Code 扩展商店搜索 AndroidSupportFramework 并安装。

Manual Install / 手动安装

# 打包 / Package
npx @vscode/vsce package

# 安装 / Install
code --install-extension android-support-framework-vs-0.0.1.vsix

Usage / 使用方法

  1. Open your AOSP module project folder in VS Code. 在 VS Code 中打开你的 AOSP 模块工程目录。

  2. Click the Android robot icon in the Activity Bar to open the AOSP Config panel. 点击 Activity Bar 中的 Android 机器人 图标打开 AOSP Config 面板。

  3. Select your AOSP source path (auto-detected if the project is inside the AOSP tree). 选择 AOSP 源码路径(若工程在 AOSP 目录树内则自动检测)。

  4. Select the product name from the dropdown (e.g., gsi_arm64, redfin). 从下拉框选择产品名称。

  5. Choose the target module from the parsed bp/mk module list. 选择解析出的 bp/mk 模块。

  6. Click Load jar to locate and register all dependency jar files. Progress is shown in the panel. 点击 Load jar 定位并注册所有依赖 jar 文件,面板会显示进度。

  7. Once loaded, Java IntelliSense and navigation will work for AOSP framework classes. 加载完成后,AOSP framework 类的智能提示和代码导航即可正常使用。

License / 许可证

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft