简体   繁体   English

如何在intellij中设置android源?

[英]how do I setup android sources in intellij?

For my project I need to be building a custom build of Android, and I'm looking to set up the source code in Intellij. 对于我的项目,我需要构建一个自定义的Android版本,并且我希望在Intellij中设置源代码。

The source code is obtained from Android Open Source Project with the these instructions . 源代码可从Android Open Source Project获得 ,并遵循以下说明 I would like to modify the Java code of some of the base modules (eg. content provider), and would like to do this in Intellij since that is my main IDE for android development. 我想修改一些基本模块的Java代码(例如,内容提供程序),并希望在Intellij中进行此操作,因为那是我用于Android开发的主要IDE。

If you're looking to build the whole AOSP within IntelliJ I'm afraid I can't help you - I think you'd be setting yourself up for lots of torment there. 如果您希望在IntelliJ中构建整个AOSP,恐怕我无能为力-我认为您会在那儿遭受很多折磨。

If, on the other hand, you just want to modify apps with it, then the easiest way I found to set up IntelliJ to do dev work on the Android source was to copy the .classpath file from development/ide/eclipse to the root directory, and then to have IntelliJ use it's "Build over existing eclipse structure" feature - it takes a long time but all of the apps I'm working in seem to load dependencies, etc just fine. 另一方面,如果您只想用它来修改应用程序,那么我发现设置IntelliJ来在Android源代码上进行开发工作的最简单方法是将.classpath文件从development / ide / eclipse复制到根目录目录,然后让IntelliJ使用它的“在现有Eclipse结构之上构建”功能-花费很长时间,但是我正在使用的所有应用似乎都可以加载依赖项,等等就很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM