1、生成生成idegen.jar
根目录执行:
mmm development/tools/idegen
[100% 1437/1437] Install: out/host/linux-x86/framework/idegen.jar
2、在源码根目录下会生成android.ipr和android.iml两个文件
根目录执行:
sudo development/tools/idegen/idegen.sh
3、修改android.ipr和android.iml 的文件读写权限,文件默认为只读权限,修改权限后
sudo chmod777 android.iml
sudo chmod777 android.ipr
4、修改android.iml文件,可以自定义只加载哪些模块,这样子在导入整个源码过程中,速度会快一点,主要看framework代码,屏蔽c++代码,C++代码可以用vscode查看
<excludeFolder url="file://$MODULE_DIR$/external/chromium" />
<excludeFolder url="file://$MODULE_DIR$/external/icu4c" />
<excludeFolder url="file://$MODULE_DIR$/external/webkit" />
<excludeFolder url="file://$MODULE_DIR$/frameworks/base/docs" />
<excludeFolder url="file://$MODULE_DIR$/hardware" />
<excludeFolder url="file://$MODULE_DIR$/kernel" />
<excludeFolder url="file://$MODULE_DIR$/libcore" />
<excludeFolder url="file://$MODULE_DIR$/libnativehelper" />
<excludeFolder url="file://$MODULE_DIR$/ndk" />
<excludeFolder url="file://$MODULE_DIR$/out" />
<excludeFolder url="file://$MODULE_DIR$/out/eclipse" />
<excludeFolder url="file://$MODULE_DIR$/out/host" />
<excludeFolder url="file://$MODULE_DIR$/out/target/common/docs" />
<excludeFolder url="file://$MODULE_DIR$/out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates" />
<excludeFolder url="file://$MODULE_DIR$/out/target/product" />
<excludeFolder url="file://$MODULE_DIR$/pdk" />
<excludeFolder url="file://$MODULE_DIR$/platform_testing" />
<excludeFolder url="file://$MODULE_DIR$/prebuilt" />
<excludeFolder url="file://$MODULE_DIR$/prebuilts" />
<excludeFolder url="file://$MODULE_DIR$/sdk" />
<excludeFolder url="file://$MODULE_DIR$/shortcut-fe" />
<excludeFolder url="file://$MODULE_DIR$/toolchain" />
<excludeFolder url="file://$MODULE_DIR$/tools" />
<excludeFolder url="file://$MODULE_DIR$/QNX" />
<excludeFolder url="file://$MODULE_DIR$/QNX_vendor" />
<excludeFolder url="file://$MODULE_DIR$/test" />