【问题标题】:which IDE should I use for aosp android?我应该为aosp android使用哪个IDE?
【发布时间】:2020-01-10 13:17:49
【问题描述】:
我需要根据 6 到 9 自定义 SystemUI,但问题是当我比较 6 源代码补丁以应用于 9 时,可能会缺少导入语句和方法映射
当我导入整个 aosp 项目并执行时。但是当我导入整个aosp项目时,它不会显示System UI methods to import or missing class的编译错误。
我可以知道哪个 IDE 最适合用于 aosp 系统应用程序吗?
【问题讨论】:
标签:
android
ide
android-source
【解决方案1】:
有一个名为 idegen 的工具可以为 IntelliJ 和 Eclipse 生成项目文件。 https://android.googlesource.com/platform/development/+/refs/heads/master/tools/idegen/README
If you're using IntelliJ...
If this is your first time using IDEGen...
Android is large, thus IDEA needs a lot of memory. Add "-Xms1g -Xmx5g" to
your VM options in "Help > Edit Custom VM" and increase the
file size limit in "Help -> Edit custom properties" by adding
"idea.max.intellisense.filesize=100000". Make sure to restart the IDE for
the new settings to take effect.
Create a JDK configuration named "1.8 (No Libraries)" by adding a new
JDK like you normally would and then removing all of the jar entries
under the "Classpath" tab. This will ensure that you only get access to
Android's core libraries and not those from your desktop VM.
From the project's root directory...
Repeat these steps after each sync...
1) make (to produce generated .java source)
2) development/tools/idegen/idegen.sh
3) Open android.ipr in IntelliJ. If you already have the project open,
hit the sync button in IntelliJ, and it will automatically detect the
updated configuration.
If you get unexpected compilation errors from IntelliJ, try running
"Build -> Rebuild Project". Sometimes IntelliJ gets confused after the
project changes significantly.
请注意,应在 IntelliJ 项目中进行一些调整以获得最佳性能http://effie.io/opening-aosp-with-intellij-part-3/。
IntelliJ 在修改框架 Java 部分时非常好,如果您需要更改 C/C++,则非常糟糕。为此,我使用 VS 代码(我只加载我需要的模块,如 Hwcomposer 或 tinyalsa HAL)
【解决方案2】:
要开发aosp系统应用,你应该使用Visual Code之类的代码编辑工具,然后通过AOSP构建系统构建(使用makefile)