Best to use Android Studio or Intellij Idea wth pl

2019-01-21 15:44发布

问题:

We have an existing java code base where we use intellij idea for development.

We are building an android application where we will be sharing code and other resources with the pre-existing code and resource base.

As Android Studio seems mainly to be a modified version of Intellij my question is are there totally specific features Android Studio has that are indispensable? Incompatible? "Standard"? vs Intellij Idea community or ultimate? Are the two interchangeable with a proper plugin set?

If we were to use Intellij Idea with the various Android support plugins, are these plugins the same as what comes with android studio? With this set of plugins will the programs virtually interchangeable?

(I did notice "ant" support is not in Android Studio. though all I need is some ability to invoke executables from the IDE with a set of menu configurable entries for various commands - I now use the intellij ant support to do this because it was available)

Will Intellij always be lagging releases being Android Studio as it is Google's "Official" Tool.

If they are significantly incompatible, what is the easiest way to use common resources and tools between the two systems?

This question is sort of wanting advice from experience - where do we best invest our learning curve and infrastructure dependency and polish our chaos surfing boards?

Thanks.

回答1:

First, a disclaimer... I have only lightly used Android Studio as I do all my work in IntelliJ IDEA. But I have been an avid user of IntelliJ IDEA since 2003.

As Android Studio seems mainly to be a modified version of Intellij my question is are there totally specific features Android Studio has that are indispensable? Incompatible? "Standard"? vs Intellij Idea community or ultimate? Are the two interchangeable with a proper plugin set?

The quick answer is there is not anything you can do in Android Studio that you cannot do in IntelliJ IDEA (Community or Ultimate) with the Android Plugin installed and enabled. Here is a screenshot from teh IntelliJ IDEA features matrix that makes that point:

Basically, Android studio has more "branding" for Android than IntelliJ IDEA. And since it is just an Android IDE, it can be more "focused". As I mentioned, there isn't anything you can do in Android Studio that you can't do in Intellij IDEA. But the opposite is not true. There are a number of (non-android) things you can do in IntelliJ IDEA (both the community and ultimate editions) that you cannot do in Android Studio.

Regarding the question of whether or not Android studio can use IntelliJ IDEA plugins, that's going to depend on the plugin and what components within the IntelliJ plugin API it leverages. When you write a plugin, you have to declare in your plugin descriptor what API dependencies you use. Some examples are com.intellij.modules.lang, com.intellij.modules.java, AntSupport, and Git4Idea. There are dozens, if not hundreds, of possibilities including other plugins. So if a plugin (or one of it dependencies) ends up using something in the plugin API that is not included in Android Studio, it will not work. For example, one plugin I wrote, that has absolutely nothing to do with mobile development, lists on the JetBrains Plugin page as being compatible with Android Studio because it only depends on com.intellij.modules.lang and com.intellij.modules.java. So while it can go both ways, it is more likely that due to IntelliJ IDEA having more components installed, that a plugin will only be compatible in IntelliJ IDEA because of a dependency on something unique to it.

Will Intellij always be lagging releases being Android Studio as it is Google's "Official" Tool.

It can go both ways. JetBrains may add things that take time to hit Android Studio. And Google may add things that take time to hit IntelliJ IDEA. Most likely, the latter will be more prevalent. But I do not know off hand how long that delay is. This JetBrians blog post may help in that regard: IntelliJ IDEA and Android Studio FAQ

My personal recommendation would be if you know you are only going to be doing Android development, go with Android Studio. But if there is a chance you might ever be working with other languages (Java, Scala, Groovy, python, php, html, css, JavaScript, etc., etc.) or any server side (or "enterprise") code, either for your Android apps or for other work, go with IntelliJ IDEA. Finally, you could always use both.

Edited Aug 4, 2018 for some clarification and an added screenshot.



回答2:

For Android development, you would be best off using Android Studio (preview 1.3 is now available).

Since Android Studio is based in Intellij, your "learning curve" should not be a problem.

For using "common resources", I assume you are referring to code ... and that should be in a repository (git / github / ...).