使用VSCode阅读Android源码


image-20200623155208434

在VSCode 中 ,打开命令面板进行编辑,可以使用UI页面编辑,也可以直接编辑json文件.

主要就是includePath,把主要的头文件路径都包含进去:

{
    "configurations": [
        {
            "name": "Mac",
            "includePath": [
                "${workspaceFolder}/frameworks/base/core/jni/include",
                "${workspaceFolder}/frameworks/base/libs/androidfw/include",
                "${workspaceFolder}/frameworks/base/libs/services/include",
                "${workspaceFolder}/frameworks/base/libs/storage/include",
                "${workspaceFolder}/frameworks/base/libs/protoutil/include",
                "${workspaceFolder}/frameworks/base/libs/incident/include",
                "${workspaceFolder}/frameworks/base/native/android/include",
                "${workspaceFolder}/frameworks/native/include",
                "${workspaceFolder}/hardware/libhardware/include",
                "${workspaceFolder}/system/core/include",
                "${workspaceFolder}/libnativehelper/include",
                "${workspaceFolder}/libnativehelper/header_only_include",
                "${workspaceFolder}/libnativehelper/include_jni",
                "${workspaceFolder}/art/libnativeloader/include",
                "${workspaceFolder}/bionic/libstdc++/include",
                "${workspaceFolder}/bionic/libc/include",
                "${workspaceFolder}/**"
            ],
            "defines": [],
            "macFrameworkPath": [],
            "compilerPath": "/usr/bin/clang++",
            "cStandard": "c11",
            "cppStandard": "gnu++14",
            "intelliSenseMode": "clang-x64"
        }
    ],
    "version": 4
}

文章作者: 姜康
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 姜康 !
评论
 上一篇
Android系统启动流程-SystemServer分析 Android系统启动流程-SystemServer分析
app_process64在启动zygote进程的时候,会从zygote进程fork出system_server进程. system_server的入口在SystemServer.java中 在Android启动流程-Zygote分析中已经
2020-06-26
下一篇 
AOSP构建-Android.bp的理解 AOSP构建-Android.bp的理解
C/C++是一种非常古老的编程语言,在大型项目开发管理过程中,单靠MAKE,CMAKE等工具已经不满足需求了,因此催生出了各种个样的构建工具,比如Google自家的GN,Bazel等,还有CMake,XMake,Vcpkg等.工具虽然多种
2020-06-25
  目录