Setting up Intellij with CyanogenMod/AOSP development
2016-04-09 09:30
543 查看
Recently, I discovered a way to import the CyanogenMod source into Intellij. Since the documentation
in this area is severely lacking, I thought I might share my experience. There are several things that I have yet to figure out, but the basic setup can be done in Intellij fairly simply (write code, browse code with CTRL+Click).
First, let's assume that you have successfully cloned the CyanogenMod/AOSP repository and built a version of android. The AOSP documentation for IDE development only documents
Eclipse and it is fairly out of date. Google included a largely unupdated tool something called
However, it does generate correct mostly correct IntelliJ configurations.
Before getting started, you first need to make sure that your IDE have lots of RAM allocated to it. You can modify the file idea.vmoptions and idea64.vmoptions and add these:
Next, you need to open up idea.properties and change
something like 5000 or more. If we don't do this IntelliJ won't parse some R.java files generated.
Note: these files are located in the IntelliJ/install/location/bin
Now go to your android root directory. Let's assume that the android root directory is
Compile the idegen tools:
Go back to the root directory and run the tool:
Go to IntelliJ, and setup an Oracle Java 6 SDK with no libraries. That's right, remove all of the jars from the "Classpath" tab.
![](https://shuhaowu.com/static/img/aosp-intellij/jdk-no-lib.png)
At this point you can open up the android.ipr file generated in the android root directory with IntelliJ and you should have AOSP imported! However, we're not done as there is some setup that needs to be fixed:
Go to File -> Project Structure. Remove all of the dependencies that ends with a .jar. This should leave you with only and the 1.6 sdk with no libraries.
![](https://shuhaowu.com/static/img/aosp-intellij/project-structure-dep.png)
Lastly, go to the Sources tab and browse to
and click Source. Apply.
![](https://shuhaowu.com/static/img/aosp-intellij/project-structure-sources.png)
Synchronize the project. Now you're done! Have fun hacking Android with IntelliJ.
![](https://shuhaowu.com/static/img/aosp-intellij/done.png)
原文地址: https://shuhaowu.com/blog/setting_up_intellij_with_aosp_development.html
in this area is severely lacking, I thought I might share my experience. There are several things that I have yet to figure out, but the basic setup can be done in Intellij fairly simply (write code, browse code with CTRL+Click).
First, let's assume that you have successfully cloned the CyanogenMod/AOSP repository and built a version of android. The AOSP documentation for IDE development only documents
Eclipse and it is fairly out of date. Google included a largely unupdated tool something called
idegenunder
development/tools.
However, it does generate correct mostly correct IntelliJ configurations.
Before getting started, you first need to make sure that your IDE have lots of RAM allocated to it. You can modify the file idea.vmoptions and idea64.vmoptions and add these:
-Xms748m -Xmx748m
Next, you need to open up idea.properties and change
idea.max.intellisense.filesizeto
something like 5000 or more. If we don't do this IntelliJ won't parse some R.java files generated.
Note: these files are located in the IntelliJ/install/location/bin
Now go to your android root directory. Let's assume that the android root directory is
~/cm.
$ cd ~/cm
Compile the idegen tools:
$ cd development/tools/idegen $ mm
Go back to the root directory and run the tool:
$ cd ~/cm$ development/tools/idegen/idegen.sh
Go to IntelliJ, and setup an Oracle Java 6 SDK with no libraries. That's right, remove all of the jars from the "Classpath" tab.
![](https://shuhaowu.com/static/img/aosp-intellij/jdk-no-lib.png)
At this point you can open up the android.ipr file generated in the android root directory with IntelliJ and you should have AOSP imported! However, we're not done as there is some setup that needs to be fixed:
Go to File -> Project Structure. Remove all of the dependencies that ends with a .jar. This should leave you with only and the 1.6 sdk with no libraries.
![](https://shuhaowu.com/static/img/aosp-intellij/project-structure-dep.png)
Lastly, go to the Sources tab and browse to
out/target/common/R. Right click on it
and click Source. Apply.
![](https://shuhaowu.com/static/img/aosp-intellij/project-structure-sources.png)
Synchronize the project. Now you're done! Have fun hacking Android with IntelliJ.
![](https://shuhaowu.com/static/img/aosp-intellij/done.png)
原文地址: https://shuhaowu.com/blog/setting_up_intellij_with_aosp_development.html
相关文章推荐
- rpm包和源码包的一些相关知识
- GDALWarp设置GDALWarpOptions::dfWarpMemoryLimit过大时处理失败
- GDALWarp设置GDALWarpOptions::dfWarpMemoryLimit过大时处理失败
- 关于产品的几个问题分析(来自京东产品经理笔试题)
- 一个优秀的数据产品经理是怎样炼成的?
- .Net 三款工作流引擎比较:WWF、netBPM 和 ccflow
- 认识产品经理(一)
- 产品经理入门方法论
- 以叫车软件为例,看高阶产品经理都是怎么分析问题的
- 修改npm下载模块的安装位置
- 使用npm安装一些包失败了的看过来(npm国内镜像介绍)
- 常用安装rpm包--必备命令
- 3.6-ansible安装rpm包管理服务
- MRD文档的写作----产品经理深入浅出课程
- package.json for NPM 文件详解
- 终于将tiny-sdpm+intellij idea+mysql+jettyt运行成功
- 尝试将 SCRIPT ompbox\private\ompmex 作为函数执行
- 你的一天 VS 50K产品经理的一天
- 论淘宝运营与互联网PM。
- rpm package installed problem