Put Android framework source code into Android Studio.
将Android Framework源码导入到Android Studio中。
Both code search, analysis, debugging are all available, not only for reading.
代码搜索、分析、调试功能均可用,不仅用于阅读。
- Code jump
- Code analysis(Data Flow, Search/Find, Call Hierarchy)
- Debugging(Attach debugger to process and debug by step, debug by breakpoint)
Branch of framework source code: android-11.0.0_r48
Commit of framework source code: 1d9b9ab57d844b18b3b1b4297725141e7788109b [2021-08-16 04:15:29 +0000]
- Star and then clone.
git clone -b project-android-11.0.0_r48 [email protected]:NasdaqGodzilla/AndroidFrameworkProject.gitgit checkout project-android-11.0.0_r48git submodule update --init- Note: All done. The commands as below is used to check if source code is under the right branch.
cd frameworks/basegit checkout android-11.0.0_r48git switch -c android-11.0.0_r48
- Open android.ipr by Android Studio.
Framework source code is added in as a git submodule. So command as below can fetch or update it.
使用下面的命令更新作为submodule的framework代码.
git submodule update --remote
A guide to use android.ipr/android.iml project for Android Studio:
博客记录的Android Studio导入AOSP源码: